diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-11-23 21:45:47 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-11-23 21:45:47 (GMT) |
commit | 191cc19ae0a2feb72d2171a0808fdc71a3b862dd (patch) | |
tree | 2d4a250a613ba94a258da9d67d29658341244761 /test | |
parent | e2863ca880a6983558d3ba3e5219164a57287f04 (diff) | |
download | hdf5-191cc19ae0a2feb72d2171a0808fdc71a3b862dd.zip hdf5-191cc19ae0a2feb72d2171a0808fdc71a3b862dd.tar.gz hdf5-191cc19ae0a2feb72d2171a0808fdc71a3b862dd.tar.bz2 |
Added vlen reclaim functions to a test in tfile.c
that leaks memory.
Diffstat (limited to 'test')
-rw-r--r-- | test/tfile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/tfile.c b/test/tfile.c index 833d2d9..d6cb427 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -2268,12 +2268,11 @@ test_file_double_file_dataset_open(hbool_t new_format) CHECK(ret, FAIL, "H5Dwrite"); /* Closing */ + /* (Leave sid1 open for later use) */ ret = H5Dclose(did1); CHECK(ret, FAIL, "H5Dclose"); ret = H5Tclose(tid1); CHECK(ret, FAIL, "H5Tclose"); - ret = H5Sclose(sid1); - CHECK(ret, FAIL, "H5Sclose"); ret = H5Pclose(dcpl); CHECK(ret, FAIL, "H5Dclose"); @@ -2392,6 +2391,8 @@ test_file_double_file_dataset_open(hbool_t new_format) HDmemset(buffer, 0, sizeof(char*) * 5); ret = H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer); CHECK(ret, FAIL, "H5Dread"); + ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, buffer); + CHECK(ret, FAIL, "H5Dvlen_reclaim"); /* Second file's dataset close */ ret = H5Dclose(did2); @@ -2404,6 +2405,9 @@ test_file_double_file_dataset_open(hbool_t new_format) /* First file's dataset read */ HDmemset(buffer, 0, sizeof(char*) * 5); ret = H5Dread(did1, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer); + CHECK(ret, FAIL, "H5Dread"); + ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, buffer); + CHECK(ret, FAIL, "H5Dvlen_reclaim"); /* First file's dataset close */ ret = H5Dclose(did1); @@ -2416,6 +2420,8 @@ test_file_double_file_dataset_open(hbool_t new_format) /* Closing */ ret = H5Tclose(tid1); CHECK(ret, FAIL, "H5Tclose"); + ret = H5Sclose(sid1); + CHECK(ret, FAIL, "H5Sclose"); ret = H5Tclose(tid2); CHECK(ret, FAIL, "H5Tclose"); |