From: David Schweikert Date: Tue, 22 May 2012 07:16:19 +0000 (+0200) Subject: #11: fix linked list corruption X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3e8dbc6494b828dd6be819d56ea9684ff75a7ac;p=fping.git #11: fix linked list corruption --- 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; }