Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / src / smpi / bindings / smpi_pmpi_comm.cpp
index 9cefd11..85dd53a 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. */
@@ -292,7 +292,9 @@ int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler){
 
 int PMPI_Comm_call_errhandler(MPI_Comm comm,int errorcode){
   CHECK_COMM(1)
-  comm->errhandler()->call(comm, errorcode);
+  MPI_Errhandler err = comm->errhandler();
+  err->call(comm, errorcode);
+  simgrid::smpi::Errhandler::unref(err);
   return MPI_SUCCESS;
 }