From 69b77b1ef5e7fb75fefba4bc1f35033d819c4527 Mon Sep 17 00:00:00 2001 From: Matthew Whitlock Date: Tue, 4 Nov 2025 12:13:50 -0600 Subject: [PATCH] pml/ob1: Move sendreq 'error after freed' check to correct location Signed-off-by: Matthew Whitlock --- ompi/mca/pml/ob1/pml_ob1_sendreq.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index 1d50ecc033d..e9946e90528 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -278,15 +278,14 @@ send_request_pml_complete(mca_pml_ob1_send_request_t *sendreq) if( !REQUEST_COMPLETE( &((sendreq->req_send).req_base.req_ompi)) ) { /* Should only be called for long messages (maybe synchronous) */ MCA_PML_OB1_SEND_REQUEST_MPI_COMPLETE(sendreq, true); - } else { - if( MPI_SUCCESS != sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR ) { - /* An error after freeing the request MUST be fatal - * MPI3 ch3.7: MPI_REQUEST_FREE */ - int err = MPI_ERR_REQUEST; - ompi_mpi_errors_are_fatal_comm_handler(NULL, &err, "Send error after request freed"); - } } } else { + if( MPI_SUCCESS != sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR ) { + /* An error after freeing the request MUST be fatal + * MPI3 ch3.7: MPI_REQUEST_FREE */ + int err = MPI_ERR_REQUEST; + ompi_mpi_errors_are_fatal_comm_handler(NULL, &err, "Send error after request freed"); + } MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq); } }