runqueue: fix use-after-free bug
authorFelix Fietkau <nbd@nbd.name>
Wed, 14 Jun 2017 10:08:42 +0000 (12:08 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 14 Jun 2017 10:10:47 +0000 (12:10 +0200)
commitcfc75c5e8ceca80dd9ca28eec3ddfdfa19bb8be2
tree38821fe07dd8362f0f2a89eb73277652b62f4564
parent96305a3cafcc9c0df7f189567671bb26ce3eb129
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>
runqueue.c