X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2cad53ea106892eb80ebd9a11d3498d1cc5d4c2e..4272e5735e685afc759b02dfbcb08acaf462c791:/src/xbt/xbt_context.c diff --git a/src/xbt/xbt_context.c b/src/xbt/xbt_context.c index e7975f1def..f3c9ecd62a 100644 --- a/src/xbt/xbt_context.c +++ b/src/xbt/xbt_context.c @@ -100,9 +100,6 @@ xbt_context_mod_exit(void) /* remove the context of the scheduler from the list of the contexts in use */ xbt_swag_remove(maestro_context, context_living); - free(maestro_context); - maestro_context = current_context = NULL; - /* * kill all the contexts in use : * the killed contexts are added in the list of the contexts to destroy @@ -114,6 +111,9 @@ xbt_context_mod_exit(void) /* destroy all contexts in the list of contexts to destroy */ xbt_context_empty_trash(); + free(maestro_context); + maestro_context = current_context = NULL; + /* destroy the lists */ xbt_swag_free(context_to_destroy); xbt_swag_free(context_living);