Fixes a minor memory leak in the SWMR use cases tests (#147)
* Due to a missing free(3) call
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user