Skip to content

Commit ee63882

Browse files
committed
request: Improve MPI_Request_free() error handling
If ompi_request_free() fails, use the ompi_errhandler_request_invoke() machinery used in the wait/test routines. This will have the side-effect of attempting to free the request a second time. Signed-off-by: Lisandro Dalcin <[email protected]>
1 parent d224268 commit ee63882

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ompi/mpi/c/request_free.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ int MPI_Request_free(MPI_Request *request)
5757
}
5858

5959
rc = ompi_request_free(request);
60+
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc && MPI_REQUEST_NULL != *request)) {
61+
(*request)->req_status.MPI_ERROR = rc;
62+
return ompi_errhandler_request_invoke(1, request, FUNC_NAME);
63+
}
6064
OMPI_ERRHANDLER_NOHANDLE_RETURN(rc, rc, FUNC_NAME);
6165
}
6266

0 commit comments

Comments
 (0)