From 5a390251ac26e0a5f46b1fc7b7416b9c33009294 Mon Sep 17 00:00:00 2001 From: alegrand Date: Thu, 12 Jun 2008 08:07:36 +0000 Subject: [PATCH 1/1] Allow reinitialization after Martin's last memleak plug. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5606 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/xbt_os_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 54880f6f45..71716e2588 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -105,6 +105,8 @@ void xbt_os_thread_mod_exit(void) { // THROW0(system_error,errcode,"pthread_key_delete failed for xbt_self_thread_key"); free(main_thread->exception); free(main_thread); + main_thread = NULL; + thread_mod_inited=0; #ifndef HAVE_SEM_WAIT xbt_os_mutex_destroy(next_sem_ID_lock); #endif -- 2.20.1