Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix refcounting of smpi::Errhandler.
[simgrid.git] / src / smpi / bindings / smpi_pmpi_file.cpp
index e84d07f..cf10029 100644 (file)
@@ -369,6 +369,8 @@ int PMPI_File_call_errhandler(MPI_File file,int errorcode){
   if (file == nullptr) {
     return MPI_ERR_WIN;
   }
-  file->errhandler()->call(file, errorcode);
+  MPI_Errhandler err = file->errhandler();
+  err->call(file, errorcode);
+  simgrid::smpi::Errhandler::unref(err);
   return MPI_SUCCESS;
 }