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.
This commit is contained in:
Jouni Malinen 2010-05-28 22:18:28 +03:00 committed by Jouni Malinen
parent 8b0ea5a07e
commit 7f5957abcf

View file

@ -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)) {