X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4b06a0f2c1439b36454b71221e99e1586ccde0d7..cb83f4f46c751c4dc32a4c9569e3626915803894:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 9fde3a03f9..1e4dc070af 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -897,9 +897,10 @@ int PMPI_Request_free(MPI_Request * request) int retval; smpi_bench_end(); - if (request == MPI_REQUEST_NULL) { + if (*request == MPI_REQUEST_NULL) { retval = MPI_ERR_ARG; } else { + if((*request)->flags & PERSISTENT)(*request)->refcount--; smpi_mpi_request_free(request); retval = MPI_SUCCESS; }