From: Augustin Degomme <26892-adegomme@users.noreply.framagit.org> Date: Mon, 3 Oct 2022 16:43:51 +0000 (+0000) Subject: MPI_Win: set to MPI_WIN_NULL after deletion to avoid possibility of calling it multip... X-Git-Tag: v3.32~2 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/642d3ee22b11b1eb2feda903773d3e9849fe124a MPI_Win: set to MPI_WIN_NULL after deletion to avoid possibility of calling it multiple times --- diff --git a/src/smpi/bindings/smpi_pmpi_win.cpp b/src/smpi/bindings/smpi_pmpi_win.cpp index cd03d889a0..cf83622f89 100644 --- a/src/smpi/bindings/smpi_pmpi_win.cpp +++ b/src/smpi/bindings/smpi_pmpi_win.cpp @@ -107,7 +107,9 @@ int PMPI_Win_free( MPI_Win* win){ return MPI_ERR_WIN; } const SmpiBenchGuard suspend_bench; - return simgrid::smpi::Win::del(*win); + simgrid::smpi::Win::del(*win); + *win = MPI_WIN_NULL; + return MPI_SUCCESS; } int PMPI_Win_set_name(MPI_Win win, const char * name)