uloop: fix a segfault on deleting the first active timer from within another timer
This commit is contained in:
parent
0e51f714d1
commit
6e7e8a1a91
1 changed files with 4 additions and 2 deletions
6
uloop.c
6
uloop.c
|
@ -464,9 +464,11 @@ static int uloop_get_next_timeout(struct timeval *tv)
|
||||||
|
|
||||||
static void uloop_process_timeouts(struct timeval *tv)
|
static void uloop_process_timeouts(struct timeval *tv)
|
||||||
{
|
{
|
||||||
struct uloop_timeout *t, *tmp;
|
struct uloop_timeout *t;
|
||||||
|
|
||||||
|
while (!list_empty(&timeouts)) {
|
||||||
|
t = list_first_entry(&timeouts, struct uloop_timeout, list);
|
||||||
|
|
||||||
list_for_each_entry_safe(t, tmp, &timeouts, list) {
|
|
||||||
if (tv_diff(&t->time, tv) > 0)
|
if (tv_diff(&t->time, tv) > 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue