From e653e45eced98b037ed17b3174b3663acd04104f Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 11 Dec 2003 13:25:11 -0500 Subject: [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 --- src/H5P.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/H5P.c b/src/H5P.c index e41fcc8..38b61e0 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -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: -- cgit v0.12