summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/H5C.c b/src/H5C.c
index e04425e..d549289 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -251,13 +251,12 @@ H5Cclose(hid_t tid)
}
/*
- * Chuck the object! This will fail when the reference count reaches zero
- * since there is no free func registered for the property list groups.
+ * Chuck the object! When the reference count reaches zero then
+ * H5A_dec_ref() removes it from the group and we should free it. The
+ * free function is not registered as part of the group because it takes
+ * an extra argument.
*/
- if (H5A_dec_ref (tid)<0) {
- H5ECLEAR;
- H5C_close (type, tmpl);
- }
+ if (0==H5A_dec_ref(tid)) H5C_close (type, tmpl);
FUNC_LEAVE (SUCCEED);
}