Timer: fix use after free

This commit is contained in:
o9000 2017-11-15 12:08:29 +01:00
parent 1be85e66fe
commit 23782a4414

View file

@ -384,6 +384,7 @@ void callback_multi_timeout(void *arg)
gettime(&cur_time);
GSList *it = mth->timeout_list;
while (it) {
GSList *next = it->next;
timeout *t = it->data;
if (++t->multi_timeout->current_count >= t->multi_timeout->count_to_expiration) {
t->_callback(t->arg);
@ -395,7 +396,7 @@ void callback_multi_timeout(void *arg)
return;
}
}
it = it->next;
it = next;
}
}