X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8ba5ebec745c34478bd1082a07edcb76aab3aefb..94974c282c6e6d096238716853bb053330170d76:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 0ee16e8772..341da2a7e3 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -4,7 +4,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "private.h" +#include "smx_private.h" #include "xbt/log.h" #include "mc/mc.h" #include "xbt/dict.h" @@ -265,7 +265,9 @@ void SIMIX_comm_destroy(smx_action_t action) if (action->comm.detached && action->state != SIMIX_DONE) { /* the communication has failed and was detached: * we have to free the buffer */ - action->comm.clean_fun(action->comm.src_buff); + if (action->comm.clean_fun) { + action->comm.clean_fun(action->comm.src_buff); + } action->comm.src_buff = NULL; }