Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Check variable size in MC_process_read_variable()
[simgrid.git] / src / msg / msg_process.c
index a14e8828be6af9f972e5e5c680bb909f85dc165b..927a4a982ff833745cad81667c18e649d67b54ce 100644 (file)
@@ -53,6 +53,7 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
 
   // free the MSG process
   xbt_free(msg_proc);
+  SIMIX_process_cleanup(smx_proc);
 }
 
 /* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
@@ -293,7 +294,7 @@ msg_host_t MSG_process_get_host(msg_process_t process)
   else {
     simdata = simcall_process_get_data(process);
   }
-  return simdata->m_host;
+  return simdata ? simdata->m_host : NULL;
 }
 
 /** \ingroup m_process_management