]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
thread: Properly clean up meta data of main thread
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 Mar 2014 17:27:22 +0000 (18:27 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 7 Mar 2014 17:28:38 +0000 (18:28 +0100)
src/libstrongswan/threading/thread.c

index eb167d6a490628c6490fa2cc76c25305f3b63577..0adfb31d00341401c9a104d9cf849ac5e426bd02 100644 (file)
@@ -496,6 +496,8 @@ void threads_deinit()
        dummy1->destroy(dummy1);
 
        main_thread->mutex->lock(main_thread->mutex);
+       main_thread->terminated = TRUE;
+       main_thread->detached_or_joined = TRUE;
        thread_destroy(main_thread);
        current_thread->destroy(current_thread);
        id_mutex->destroy(id_mutex);