X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/17d4a7d5c95d752ba57150fd68955c80da3f46d7..0ff207b9e492129a12c9e892ee4b9de9d70f3a63:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 04403d528d..36ec03c000 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -294,6 +294,7 @@ static inline void SIMIX_communication_wait_for_completion(smx_comm_t comm, doub SIMIX_communication_destroy(comm); THROW0(network_error, 0, "Link failure"); } + SIMIX_communication_destroy(comm); } /** @@ -473,8 +474,6 @@ smx_comm_t SIMIX_network_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_s XBT_INLINE void SIMIX_network_wait(smx_comm_t comm, double timeout) { /* Wait for communication completion */ SIMIX_communication_wait_for_completion(comm, timeout); - - SIMIX_communication_destroy(comm); } /** @Returns whether the (asynchronous) communication is done yet or not */ @@ -517,6 +516,7 @@ unsigned int SIMIX_network_waitany(xbt_dynar_t comms) { SIMIX_communication_destroy(comm_finished); THROW0(network_error, 0, "Link failure"); } + SIMIX_communication_destroy(comm_finished); return found_comm; }