diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2012-02-02 17:02:28 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2012-02-02 17:02:28 (GMT) |
commit | 7bd8d0f25e0c10cca68396962e4d6ea7f54cfb9e (patch) | |
tree | d5c24a338921823e1023ecabaaf06599f7c9ff4d /test/tfile.c | |
parent | 75e9bf9e2ce047ba833ea35a0d068255cf0588ed (diff) | |
download | hdf5-7bd8d0f25e0c10cca68396962e4d6ea7f54cfb9e.zip hdf5-7bd8d0f25e0c10cca68396962e4d6ea7f54cfb9e.tar.gz hdf5-7bd8d0f25e0c10cca68396962e4d6ea7f54cfb9e.tar.bz2 |
[svn-r21904] This is a followup commit for Issue 7756 - Creating a dataset in a read-only file caused seg fault when the file is closed. I changed the error ID from H5E_CACHE to H5E_OHDR in the error report macro in H5O_create and fixed a minor problem in tfile.c.
Tested on jam and MacGoblin - minor changes.
Diffstat (limited to 'test/tfile.c')
-rw-r--r-- | test/tfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tfile.c b/test/tfile.c index e3b0c81..53ca035 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1318,15 +1318,15 @@ test_file_perm2(void) type = H5Tcopy(H5T_NATIVE_SHORT); CHECK(type, FAIL, "H5Tcopy"); - type = H5Tcopy(H5T_NATIVE_SHORT); - CHECK(type, FAIL, "H5Tcopy"); - /* Commit a datatype with the read-only file handle (should fail) */ H5E_BEGIN_TRY { ret = H5Tcommit2(filero, "MY_DTYPE", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Tcommit2"); + ret = H5Tclose(type); + CHECK(ret, FAIL, "H5Tclose"); + ret = H5Fclose(filero); CHECK(ret, FAIL, "H5Fclose"); |