Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please AddressSan: match new/delete and plug a memleak
[simgrid.git] / src / smpi / smpi_global.cpp
index 834467a..6dffca8 100644 (file)
@@ -15,7 +15,6 @@
 #include "src/mc/mc_replay.h"
 #include "src/msg/msg_private.h"
 #include "src/simix/smx_private.h"
-#include "src/smpi/smpi_group.hpp"
 #include "surf/surf.h"
 #include "xbt/replay.h"
 
@@ -647,7 +646,7 @@ void smpi_global_destroy()
     MPI_COMM_WORLD->cleanup_attributes();
     if(smpi_coll_cleanup_callback!=nullptr)
       smpi_coll_cleanup_callback();
-    xbt_free(MPI_COMM_WORLD);
+    delete MPI_COMM_WORLD;
   }
 
   MPI_COMM_WORLD = MPI_COMM_NULL;