From 4713a6d23840ed222d90f3ca73f037cb20b5d444 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Thu, 3 Dec 2020 09:16:30 -0800 Subject: Fixes a minor memory leak in the SWMR use cases tests (#147) * Due to a missing free(3) call --- test/use_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/use_common.c b/test/use_common.c index 7a3c95a..50b82c5 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -442,7 +442,7 @@ read_uc_file(hbool_t towait, options_t *opts) { hid_t fid; /* File ID for new HDF5 file */ hid_t dsid; /* dataset ID */ - UC_CTYPE *buffer, *bufptr; /* read data buffer */ + UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */ hid_t f_sid; /* dataset file space id */ hid_t m_sid; /* memory space id */ int rank; /* rank */ @@ -605,6 +605,8 @@ read_uc_file(hbool_t towait, options_t *opts) return -1; } + HDfree(buffer); + if (nreadererr) return -1; else -- cgit v0.12