Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No, scan-build, there is no memory leak here.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 8 Nov 2019 09:51:57 +0000 (10:51 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 10 Nov 2019 09:41:17 +0000 (10:41 +0100)
src/smpi/mpi/smpi_comm.cpp

index e8e893f..be9d0fa 100644 (file)
@@ -571,6 +571,7 @@ MPI_Comm Comm::split_type(int type, int /*key*/, MPI_Info)
   if(type != MPI_UNDEFINED)
     return res;
   else{
   if(type != MPI_UNDEFINED)
     return res;
   else{
+    xbt_assert(res->refcount_ == 1); // ensure the next call to Comm::destroy really frees the comm
     Comm::destroy(res);
     return MPI_COMM_NULL;
   }
     Comm::destroy(res);
     return MPI_COMM_NULL;
   }