Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / simix / smx_process.cpp
index 223cba7..87d4355 100644 (file)
@@ -91,10 +91,11 @@ void SIMIX_process_cleanup(smx_process_t process)
           comm, (int)comm->state, comm->src_proc, comm->dst_proc);
       comm->dst_proc = NULL;
 
-      if (comm->detached && /* FIXME: This code should be moved within comm->unref() anyway. comm->refcount == 1 &&*/ comm->src_proc != NULL) {
+      if (comm->detached && comm->src_proc != NULL) {
         /* the comm will be freed right now, remove it from the sender */
         xbt_fifo_remove(comm->src_proc->comms, comm);
       }
+      
       comm->unref();
     } else {
       xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
@@ -515,7 +516,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
     } else if (raw != nullptr) {
       SIMIX_synchro_stop_waiting(process, &process->simcall);
-      SIMIX_synchro_destroy(process->waiting_synchro);
+      delete process->waiting_synchro;
 
     } else if (io != nullptr) {
       SIMIX_io_destroy(process->waiting_synchro);