From 7f5957abcf52896b0e0ad7655cedfd6fc0a692f4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 28 May 2010 22:18:28 +0300 Subject: [PATCH] eloop: Fix crash on signal handler cancelling next timeout It is possible that the timeout pointer becomes invalid in one of the signal handlers, so we need to reload the pointer after those. --- src/utils/eloop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/eloop.c b/src/utils/eloop.c index ac9998922..4b615989c 100644 --- a/src/utils/eloop.c +++ b/src/utils/eloop.c @@ -529,6 +529,8 @@ void eloop_run(void) eloop_process_pending_signals(); /* check if some registered timeouts have occurred */ + timeout = dl_list_first(&eloop.timeout, struct eloop_timeout, + list); if (timeout) { os_get_time(&now); if (!os_time_before(&now, &timeout->time)) {