From b9da39d19fa321ebee76db994571ed7a02178db0 Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Fri, 12 Nov 2021 11:28:47 -0600 Subject: Fix MPI Comm and Info leak in H5FD__mpio_delete (#1189) --- src/H5FDmpio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index f8ac610..67b01f1 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1804,6 +1804,12 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id) HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code) done: + /* Free duplicated MPI Communicator and Info objects */ + if (H5_mpi_comm_free(&comm) < 0) + HDONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free MPI communicator") + if (H5_mpi_info_free(&info) < 0) + HDONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free MPI info object") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__mpio_delete() */ -- cgit v0.12