From: Jérémie Astor Date: Sat, 4 Sep 2021 10:00:16 +0000 (+0200) Subject: :bomb: Fix Shred leak X-Git-Tag: nightly~470^2~21 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=99bb32581a6bddc2d468e6d9d472505241bc5151;p=gwion.git :bomb: Fix Shred leak --- 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); }