Fixes a minor memory leak in the SWMR use cases tests (#147)

* Due to a missing free(3) call
This commit is contained in:
Dana Robinson
2020-12-03 09:16:30 -08:00
committed by GitHub
parent bf0cbcbea5
commit 4713a6d238

View File

@@ -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