From: Jouni Malinen Date: Fri, 28 May 2010 19:18:28 +0000 (+0300) Subject: eloop: Fix crash on signal handler cancelling next timeout X-Git-Tag: hostap-1-bp~1284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5957abcf52896b0e0ad7655cedfd6fc0a692f4;p=thirdparty%2Fhostap.git 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. --- 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)) {