diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-08-31 10:36:48 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-08-31 10:36:48 +0000 |
commit | 3c21579aa6365c053baf82680882a01949b1e902 (patch) | |
tree | 1c1a26f445b8e750dcc696cad3175680f80e9f80 /rts/Task.c | |
parent | 57e4541e9922a49b01aee93a7468526e21cd6bf6 (diff) | |
download | haskell-3c21579aa6365c053baf82680882a01949b1e902.tar.gz |
free the task *after* calling closeCond and closeMutex
Diffstat (limited to 'rts/Task.c')
-rw-r--r-- | rts/Task.c | 2 |
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); |