diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-21 01:49:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-21 01:49:55 (GMT) |
commit | 036e799cf9efb1a8da3bf9ce7287177888ca9556 (patch) | |
tree | be6e262bde93039c97c0f968c404db4a1c287354 /src/H5O.c | |
parent | f6deaca1d4cca061273cd6daef0357200d4c6ea4 (diff) | |
download | hdf5-036e799cf9efb1a8da3bf9ce7287177888ca9556.zip hdf5-036e799cf9efb1a8da3bf9ce7287177888ca9556.tar.gz hdf5-036e799cf9efb1a8da3bf9ce7287177888ca9556.tar.bz2 |
[svn-r12955] Description:
Finish implementing H5Oopen_by_idx() (still needs tests)
Tested on:
Linux/32 2.4 (chicago)
Linux/64 2.4 (chicago2)
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -348,10 +348,10 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5L_index_t idx_type, HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object") done: - if(ret_value < 0) - if(loc_found) - if(H5G_loc_free(&obj_loc) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") + /* Release the object location if we failed after copying it */ + if(ret_value < 0 && loc_found) + if(H5G_loc_free(&obj_loc) < 0) + HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") FUNC_LEAVE_API(ret_value) } /* end H5Oopen_by_idx() */ |