X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/030e7d63a2fc3a0f82f5c820e1d0ac02d2021ba2..00e8231fa94528961cddaa1fe35e232de5438e76:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 11b84c6d64..bc09a3e34b 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -219,6 +219,9 @@ void SIMIX_comm_destroy(smx_action_t action) SIMIX_comm_destroy_internal_actions(action); + if(action->comm.detached) + ((void_f_pvoid_t)action->comm.src_data)(action->comm.src_buff); + xbt_free(action); } @@ -265,8 +268,10 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv, /* If the communication action is detached then decrease the refcount * by one, so it will be eliminated by the receivers destroy call */ - if(detached) + if(detached){ + action->comm.detached = 1; action->comm.refcount--; + } /* Setup the communication request */ action->comm.src_proc = src_proc;