diff --git a/src/thread/thread.c b/src/thread/thread.c index e730de2..a5535d1 100644 --- a/src/thread/thread.c +++ b/src/thread/thread.c @@ -217,7 +217,7 @@ void __attribute__((destructor)) clear_last_thread() TRACE("POST"); // Running is the initial main thread. Just free the entry. if (!WAS_ALLOCATED(running)) { - free(running); + clear_context(); exit(0); }