Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Go ahead for cleanup, even if process was suspended.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 8 Feb 2014 13:53:36 +0000 (14:53 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 8 Feb 2014 13:54:19 +0000 (14:54 +0100)
Prevents memory leaks in examples from msg/cloud.

src/simix/smx_context_base.c

index 848b8d7..5dc3a74 100644 (file)
@@ -87,6 +87,7 @@ void smx_ctx_base_stop(smx_context_t context)
 {
   if (context->cleanup_func)
     context->cleanup_func(context->process);
+  context->process->suspended = 0;
   context->iwannadie = 0;
   simcall_process_cleanup(context->process);
   context->iwannadie = 1;