Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Destroy the context of the maestro after the call of the function xbt_context_empty_t...
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 7 Jan 2008 14:29:26 +0000 (14:29 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 7 Jan 2008 14:29:26 +0000 (14:29 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5160 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/xbt_context.c

index e7975f1..f3c9ecd 100644 (file)
@@ -100,9 +100,6 @@ xbt_context_mod_exit(void)
                /* remove the context of the scheduler from the list of the contexts in use */\r
                xbt_swag_remove(maestro_context, context_living);\r
                \r
-               free(maestro_context);\r
-               maestro_context = current_context = NULL;\r
-               \r
                /*  \r
                 * kill all the contexts in use :\r
                 * the killed contexts are added in the list of the contexts to destroy\r
@@ -114,6 +111,9 @@ xbt_context_mod_exit(void)
                /* destroy all contexts in the list of contexts to destroy */\r
                xbt_context_empty_trash();\r
                \r
+               free(maestro_context);\r
+               maestro_context = current_context = NULL;\r
+               \r
                /* destroy the lists */\r
                xbt_swag_free(context_to_destroy);\r
                xbt_swag_free(context_living);\r