sched: reset timer queue in finalization
Don't leave dangling pointers to timer queue entries when they are
freed in the scheduler finalization in case some code tried to remove
a timer later.
Fixes: 6ea1082a72
("sched: free timer blocks on exit")
This commit is contained in:
parent
bc76291750
commit
6661a61486
1 changed files with 2 additions and 0 deletions
2
sched.c
2
sched.c
|
@ -163,6 +163,8 @@ SCH_Finalise(void) {
|
|||
|
||||
ARR_DestroyInstance(file_handlers);
|
||||
|
||||
timer_queue.next = &timer_queue;
|
||||
timer_queue.prev = &timer_queue;
|
||||
for (i = 0; i < ARR_GetSize(tqe_blocks); i++)
|
||||
Free(*(TimerQueueEntry **)ARR_GetElement(tqe_blocks, i));
|
||||
ARR_DestroyInstance(tqe_blocks);
|
||||
|
|
Loading…
Reference in a new issue