diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 6343a88e5..5c91f3ce2 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -3730,7 +3730,7 @@ bool of_ZOMBIE(vthread_t thr, vvp_code_t) { thr->pc = codespace_null(); if ((thr->parent == 0) && (thr->child == 0)) - delete thr; + schedule_del_thr(thr); return false; }