Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] fixing some memory leaks in smpi instrumentation code
[simgrid.git] / src / smpi / smpi_coll.c
index 7798de8..1c05340 100644 (file)
@@ -118,6 +118,9 @@ static void tree_bcast(void *buf, int count, MPI_Datatype datatype,
   }
   smpi_mpi_startall(tree->numChildren, requests);
   smpi_mpi_waitall(tree->numChildren, requests, MPI_STATUS_IGNORE);
+  for (i = 0; i < tree->numChildren; i++){
+    xbt_free (requests[i]);
+  }
   xbt_free(requests);
 }
 
@@ -156,6 +159,9 @@ static void tree_antibcast(void *buf, int count, MPI_Datatype datatype,
   }
   smpi_mpi_startall(tree->numChildren, requests);
   smpi_mpi_waitall(tree->numChildren, requests, MPI_STATUS_IGNORE);
+  for (i = 0; i < tree->numChildren; i++){
+    xbt_free (requests[i]);
+  }
   xbt_free(requests);
 }