From caf4d30c669ad8b64ef566b8bab4aec445b90b46 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 11 Oct 2010 17:12:03 +0200 Subject: [PATCH] uloop timer: update the timeout->next->prev when adding timeout to the list --- uloop.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.25.1