]> Nishi Git Mirror - gwion.git/commitdiff
:bomb: Fix Shred leak
authorJérémie Astor <fennecdjay@gmail.com>
Sat, 4 Sep 2021 10:00:16 +0000 (12:00 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Sat, 4 Sep 2021 10:00:16 +0000 (12:00 +0200)
src/lib/shred.c
src/vm/shreduler.c

index df5a981aab3b1713935df039a2ad439a3eb2fd4a..18c1be75fb0962d11302f4cde5cf3bbec883e689 100644 (file)
@@ -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;
   }
 }
 
index 17810b19ed27b869d9a13bf8819ec147dc0764bc..5ffc73a1eb32d9288d00ab17a5b83fed558f3e53 100644 (file)
@@ -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);
 }