From 99bb32581a6bddc2d468e6d9d472505241bc5151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 4 Sep 2021 12:00:16 +0200 Subject: [PATCH] :bomb: Fix Shred leak --- src/lib/shred.c | 3 ++- src/vm/shreduler.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/shred.c b/src/lib/shred.c index df5a981a..18c1be75 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -157,7 +157,8 @@ describe_name(, s->info->orig->name) describe_name(_code, s->code->name) static DTOR(shred_dtor) { if (ME(o)) { VM_Shred s = ME(o); - free_vm_shred(s); +// free_vm_shred(s); +// ME(o) = NULL; } } diff --git a/src/vm/shreduler.c b/src/vm/shreduler.c index 17810b19..5ffc73a1 100644 --- a/src/vm/shreduler.c +++ b/src/vm/shreduler.c @@ -61,6 +61,7 @@ ANN void shreduler_remove(const Shreduler s, const VM_Shred out, shreduler_erase(s, tk); ME(out->info->me) = NULL; release(out->info->me, out); + free_vm_shred(out); } MUTEX_UNLOCK(s->mutex); } -- 2.43.0