summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-12-03 17:16:30 (GMT)
committerGitHub <noreply@github.com>2020-12-03 17:16:30 (GMT)
commit4713a6d23840ed222d90f3ca73f037cb20b5d444 (patch)
treec1ba8aa774af246dc30abe27087600d0c24f060b /test
parentbf0cbcbea5043fccc1915f8d8b113729accd382a (diff)
downloadhdf5-4713a6d23840ed222d90f3ca73f037cb20b5d444.zip
hdf5-4713a6d23840ed222d90f3ca73f037cb20b5d444.tar.gz
hdf5-4713a6d23840ed222d90f3ca73f037cb20b5d444.tar.bz2
Fixes a minor memory leak in the SWMR use cases tests (#147)
* Due to a missing free(3) call
Diffstat (limited to 'test')
-rw-r--r--test/use_common.c4
1 files changed, 3 insertions, 1 deletions
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