diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-11-28 15:37:23 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-11-28 15:37:23 (GMT) |
commit | 4ddc4a602f6342168bb9d8db71937457d586d201 (patch) | |
tree | 3794fd655156b42aef4e2c48ab9133e3f5be99d4 /test | |
parent | 4ab127aa9cacef679dc5646f865f070dbb7f9d9d (diff) | |
parent | 191cc19ae0a2feb72d2171a0808fdc71a3b862dd (diff) | |
download | hdf5-4ddc4a602f6342168bb9d8db71937457d586d201.zip hdf5-4ddc4a602f6342168bb9d8db71937457d586d201.tar.gz hdf5-4ddc4a602f6342168bb9d8db71937457d586d201.tar.bz2 |
Merge pull request #171 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_memfix to develop
Fix for tfile.c valgrind issues.
* commit '191cc19ae0a2feb72d2171a0808fdc71a3b862dd':
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"); |