diff --git a/ompi/mca/coll/base/coll_base_alltoallv.c b/ompi/mca/coll/base/coll_base_alltoallv.c index 5eddf55bfe..76befdfa67 100644 --- a/ompi/mca/coll/base/coll_base_alltoallv.c +++ b/ompi/mca/coll/base/coll_base_alltoallv.c @@ -288,8 +288,7 @@ ompi_coll_base_alltoallv_intra_basic_linear(const void *sbuf, const int *scounts * So free them anyway -- even if there was an error, and return the * error after we free everything. */ err = ompi_request_wait_all(nreqs, reqs, MPI_STATUSES_IGNORE); - if( MPI_SUCCESS == err ) - return MPI_SUCCESS; + err_hndl: /* Free the requests in all cases as they are persistent */ ompi_coll_base_free_reqs(reqs, nreqs); diff --git a/ompi/mca/coll/basic/coll_basic_alltoall.c b/ompi/mca/coll/basic/coll_basic_alltoall.c index 354650fd95..acb08b8455 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoall.c +++ b/ompi/mca/coll/basic/coll_basic_alltoall.c @@ -100,7 +100,7 @@ mca_coll_basic_alltoall_inter(const void *sbuf, int scount, MCA_COLL_BASE_TAG_ALLTOALL, MCA_PML_BASE_SEND_STANDARD, comm, sreq)); if (OMPI_SUCCESS != err) { - ompi_coll_base_free_reqs(req, i + 1); + ompi_coll_base_free_reqs(req, i + size + 1); return err; } } diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c b/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c index 58c83032f7..4399f9133f 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c @@ -219,7 +219,7 @@ mca_coll_basic_neighbor_allgather_dist_graph(const void *sbuf, int scount, rc = ompi_request_wait_all (indegree + outdegree, reqs, MPI_STATUSES_IGNORE); if (OMPI_SUCCESS != rc) { - ompi_coll_base_free_reqs(reqs, indegree + outdegree + 1); + ompi_coll_base_free_reqs(reqs, indegree + outdegree); } return rc; }