runqueue: fix use-after-free bug
Calling t->complete in runqueue_task_complete can free the memory associated with t. Change the runqueue_start_next accordingly. Fixes https://github.com/openwrt/openwrt/issues/493 Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
368fd26458
commit
6a7fb7d8df
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ void runqueue_task_complete(struct runqueue_task *t)
|
||||||
t->cancelled = false;
|
t->cancelled = false;
|
||||||
if (t->complete)
|
if (t->complete)
|
||||||
t->complete(q, t);
|
t->complete(q, t);
|
||||||
runqueue_start_next(t->q);
|
runqueue_start_next(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue