summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2021-11-12 17:28:47 (GMT)
committerGitHub <noreply@github.com>2021-11-12 17:28:47 (GMT)
commitb9da39d19fa321ebee76db994571ed7a02178db0 (patch)
tree63d46b8922885fae5c8b86f73a2f1561b76748c8 /src
parente4956cdba93db01b18721023f6bc5fe125a5d5bd (diff)
downloadhdf5-b9da39d19fa321ebee76db994571ed7a02178db0.zip
hdf5-b9da39d19fa321ebee76db994571ed7a02178db0.tar.gz
hdf5-b9da39d19fa321ebee76db994571ed7a02178db0.tar.bz2
Fix MPI Comm and Info leak in H5FD__mpio_delete (#1189)
Diffstat (limited to 'src')
-rw-r--r--src/H5FDmpio.c6
1 files changed, 6 insertions, 0 deletions
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() */