Commit 3c21579a authored by Simon Marlow's avatar Simon Marlow

free the task *after* calling closeCond and closeMutex

parent 57e4541e
......@@ -76,11 +76,11 @@ stopTaskManager (void)
ACQUIRE_LOCK(&sched_mutex);
for (task = task_free_list; task != NULL; task = next) {
next = task->next;
stgFree(task);
#if defined(THREADED_RTS)
closeCondition(&task->cond);
closeMutex(&task->lock);
#endif
stgFree(task);
}
task_free_list = NULL;
RELEASE_LOCK(&sched_mutex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment