summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/Task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 57497e427b..dcfa5b5aee 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -74,7 +74,7 @@ stopTaskManager (void)
tasksRunning);
ACQUIRE_LOCK(&sched_mutex);
- for (task = task_free_list; task != NULL; next) {
+ for (task = task_free_list; task != NULL; task = next) {
next = task->next;
stgFree(task);
}