]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/bindings/smpi_pmpi_file.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix issues with attr and cloning
[simgrid.git] / src / smpi / bindings / smpi_pmpi_file.cpp
index e84d07fc7c62320de1164eaff0b87b2bb0ed8ba0..aadb5952ce44e944faa445caeed8b48ab39490c9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -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;
 }