diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-09-08 21:59:33 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-09-08 21:59:33 (GMT) |
commit | 09981b58d800d784a2aa7e3ea5f7f1cad576e8db (patch) | |
tree | c95c14078556f0f7630259c5824f6daf76f3520c /test | |
parent | f58c2c5cced54d0dbbd72c49bd5dd03c28865196 (diff) | |
download | hdf5-09981b58d800d784a2aa7e3ea5f7f1cad576e8db.zip hdf5-09981b58d800d784a2aa7e3ea5f7f1cad576e8db.tar.gz hdf5-09981b58d800d784a2aa7e3ea5f7f1cad576e8db.tar.bz2 |
Fixes a leak of the metadata index memory
Diffstat (limited to 'test')
-rw-r--r-- | test/vfd_swmr_reader.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/vfd_swmr_reader.c b/test/vfd_swmr_reader.c index ff31bdd..5f61102 100644 --- a/test/vfd_swmr_reader.c +++ b/test/vfd_swmr_reader.c @@ -88,8 +88,8 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, int fill_count = 0; /* # of times fill value (0) was read * instead of the expected value. */ - hid_t dsid; /* Dataset ID */ - hid_t file_sid; /* Dataset's space ID */ + hid_t dsid = H5I_INVALID_HID; /* Dataset ID */ + hid_t file_sid = H5I_INVALID_HID; /* Dataset's space ID */ hssize_t snpoints; /* Number of elements in dataset */ hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */ @@ -237,9 +237,9 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, time_t curr_time; /* Current time */ symbol_info_t **sym_com = NULL; /* Pointers to array of common dataset IDs */ symbol_info_t **sym_rand = NULL; /* Pointers to array of random dataset IDs */ - hid_t mem_sid; /* Memory dataspace ID */ - hid_t fid; /* SWMR test file ID */ - hid_t fapl; /* file access property list */ + hid_t mem_sid = H5I_INVALID_HID; /* Memory dataspace ID */ + hid_t fid = H5I_INVALID_HID; /* SWMR test file ID */ + hid_t fapl = H5I_INVALID_HID; /* file access property list */ symbol_t record; /* The record to read from the dataset */ unsigned v; /* Local index variable */ hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ @@ -672,6 +672,10 @@ int main(int argc, const char *argv[]) HDexit(1); } /* end if */ + /* Close the output file */ + if(verbose) + HDfclose(verbose_file); + return 0; } |