Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename SIMIX files
[simgrid.git] / src / simix / smx_network.c
index 0ee16e8..341da2a 100644 (file)
@@ -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;
   }