From: Felix Fietkau Date: Mon, 11 Oct 2010 15:12:03 +0000 (+0200) Subject: uloop timer: update the timeout->next->prev when adding timeout to the list X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=caf4d30c669ad8b64ef566b8bab4aec445b90b46;p=oweals%2Frelayd.git uloop timer: update the timeout->next->prev when adding timeout to the list --- diff --git a/uloop.c b/uloop.c index 8c85906..da418b7 100644 --- a/uloop.c +++ b/uloop.c @@ -118,6 +118,8 @@ int uloop_timeout_add(struct uloop_timeout *timeout) timeout->prev = prev; timeout->next = *head; + if (timeout->next) + timeout->next->prev = timeout; *head = timeout; timeout->pending = true;