]> git.gsnw.org Git - fping.git/commitdiff
#11: fix linked list corruption
authorDavid Schweikert <david@schweikert.ch>
Tue, 22 May 2012 07:16:19 +0000 (09:16 +0200)
committerDavid Schweikert <david@schweikert.ch>
Tue, 22 May 2012 07:16:19 +0000 (09:16 +0200)
src/fping.c

index 3d185546266d0dde2d1cf73518d09c5a5493cf81..e0db38389b422a3d1a93fdaf9016a578a9f67538 100644 (file)
@@ -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;
 }