diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-11 18:25:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-11 18:25:11 (GMT) |
commit | e653e45eced98b037ed17b3174b3663acd04104f (patch) | |
tree | 44c8ebf2ebf6dcfe43587e65903b84858717f2c3 | |
parent | b2e093e28cb2b255bdfac9dac2866793976bd9ea (diff) | |
download | hdf5-e653e45eced98b037ed17b3174b3663acd04104f.zip hdf5-e653e45eced98b037ed17b3174b3663acd04104f.tar.gz hdf5-e653e45eced98b037ed17b3174b3663acd04104f.tar.bz2 |
[svn-r7930] Purpose:
Bug fix/code cleanup
Description:
Make H5Pclose_class() decrement the ID's reference count to close a generic
property class ID, which allows the new H5I routines to work correctly.
Platforms tested:
FreeBSD 4.9 (sleipnir)
h5committest
-rw-r--r-- | src/H5P.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -5553,18 +5553,17 @@ done: herr_t H5Pclose_class(hid_t cls_id) { - H5P_genclass_t *pclass; /* Property list class created */ hid_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(H5Pclose_class, FAIL); H5TRACE1("e","i",cls_id); /* Check arguments */ - if (H5I_GENPROP_CLS != H5I_get_type(cls_id) || NULL == (pclass = H5I_remove(cls_id))) + if (H5I_GENPROP_CLS != H5I_get_type(cls_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class"); - /* Delete the property list class */ - if (H5P_close_class(pclass) < 0) + /* Close the property list class */ + if (H5I_dec_ref(cls_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close"); done: |