summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-08-31 10:36:48 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-08-31 10:36:48 +0000
commit3c21579aa6365c053baf82680882a01949b1e902 (patch)
tree1c1a26f445b8e750dcc696cad3175680f80e9f80 /rts/Task.c
parent57e4541e9922a49b01aee93a7468526e21cd6bf6 (diff)
downloadhaskell-3c21579aa6365c053baf82680882a01949b1e902.tar.gz
free the task *after* calling closeCond and closeMutex
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 72147256d8..11307a7703 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -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);