aboutsummaryrefslogtreecommitdiffstats
path: root/yarvcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'yarvcore.c')
-rw-r--r--yarvcore.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/yarvcore.c b/yarvcore.c
index 507a2f8c68..6c4f83294c 100644
--- a/yarvcore.c
+++ b/yarvcore.c
@@ -226,7 +226,10 @@ thread_free(void *ptr)
if (ptr) {
th = ptr;
- FREE_UNLESS_NULL(th->stack);
+
+ if (!th->root_fiber) {
+ FREE_UNLESS_NULL(th->stack);
+ }
if (th->local_storage) {
st_free_table(th->local_storage);