Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / smpi / bindings / smpi_pmpi_win.cpp
index cd03d88..a125ec9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2023. 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. */
@@ -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)