From: alegrand Date: Thu, 12 Jun 2008 08:07:36 +0000 (+0000) Subject: Allow reinitialization after Martin's last memleak plug. X-Git-Tag: v3.3~373 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5a390251ac26e0a5f46b1fc7b7416b9c33009294?hp=0c84313d3072b90158c775fbbee4ee5a32810614 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 --- 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