Skip to content
Snippets Groups Projects
Commit 1f801e3a authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Free all tasks on exit, not just those on the task_free_list

parent 48aefd90
No related merge requests found
......@@ -83,14 +83,15 @@ freeTaskManager (void)
debugTrace(DEBUG_sched, "freeing task manager");
ACQUIRE_LOCK(&sched_mutex);
for (task = task_free_list; task != NULL; task = next) {
for (task = all_tasks; task != NULL; task = next) {
#if defined(THREADED_RTS)
closeCondition(&task->cond);
closeMutex(&task->lock);
#endif
next = task->next;
next = task->all_link;
stgFree(task);
}
all_tasks = NULL;
task_free_list = NULL;
RELEASE_LOCK(&sched_mutex);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment