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:
parent
8b0ea5a07e
commit
7f5957abcf
1 changed files with 2 additions and 0 deletions
|
@ -529,6 +529,8 @@ void eloop_run(void)
|
||||||
eloop_process_pending_signals();
|
eloop_process_pending_signals();
|
||||||
|
|
||||||
/* check if some registered timeouts have occurred */
|
/* check if some registered timeouts have occurred */
|
||||||
|
timeout = dl_list_first(&eloop.timeout, struct eloop_timeout,
|
||||||
|
list);
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
os_get_time(&now);
|
os_get_time(&now);
|
||||||
if (!os_time_before(&now, &timeout->time)) {
|
if (!os_time_before(&now, &timeout->time)) {
|
||||||
|
|
Loading…
Reference in a new issue