From c3e8dbc6494b828dd6be819d56ea9684ff75a7ac Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Tue, 22 May 2012 09:16:19 +0200 Subject: [PATCH] #11: fix linked list corruption --- src/fping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fping.c b/src/fping.c index 3d18554..e0db383 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1152,6 +1152,7 @@ void main_loop() ev_enqueue(h); } } + /* Event type: timeout */ else if(ev_first->ev_type == EV_TYPE_TIMEOUT) { num_timeout++; remove_job(ev_first); @@ -2785,6 +2786,8 @@ void ev_remove(HOST_ENTRY *h) if(h->ev_next) { h->ev_next->ev_prev = h->ev_prev; } + h->ev_prev = NULL; + h->ev_next = NULL; }