diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-06 19:42:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-06 19:42:49 (GMT) |
commit | cd3f42096b9a957e37c9df48aa0d31d9ed4bc537 (patch) | |
tree | 86a1672d114762d3aea872e44104e65d1bc09254 /hl/src/H5LT.c | |
parent | 434643dd4d14a841abdcc73ad7b3a0a8e06e4438 (diff) | |
download | hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.zip hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.gz hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.bz2 |
[svn-r22636] Description:
Bring r22599:22634 from trunk to revise_chunks branch
Tested on:
Mac OSX/64 10.7.4 (amazon) w/gcc 4.7.x, C++ & FORTRAN
(No need for h5committest yet on this branch)
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r-- | hl/src/H5LT.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 678642f..eed2721 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -3024,8 +3024,11 @@ herr_t H5LTget_attribute_string( hid_t loc_id, return -1; /* Get the attribute */ - if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 ) - return -1; + if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 ) + { + H5Oclose(obj_id); + return -1; + } /* Close the object */ if(H5Oclose(obj_id) < 0) @@ -3458,6 +3461,8 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id, return 0; out: + if(obj_id > 0) + H5Oclose(obj_id); if(attr_id > 0) H5Aclose(attr_id); return -1; |