Commit e7e42c83 authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix double-free in T5644 (#12208)

parent 0ba34b6b
......@@ -1867,8 +1867,6 @@ delete_threads_and_gc:
}
task->cap = cap;
}
stgFree(idle_cap);
#endif
if (heap_overflow && sched_state < SCHED_INTERRUPTING) {
......@@ -1897,6 +1895,8 @@ delete_threads_and_gc:
#endif
#if defined(THREADED_RTS)
stgFree(idle_cap);
if (gc_type == SYNC_GC_SEQ) {
// release our stash of capabilities.
releaseAllCapabilities(n_capabilities, cap, task);
......
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