summaryrefslogtreecommitdiffstats
path: root/src/H5Groot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Groot.c')
-rw-r--r--src/H5Groot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5Groot.c b/src/H5Groot.c
index a79a5dd..ff4a8c4 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -15,7 +15,7 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Gobj.c
+ * Created: H5Groot.c
* Apr 8 2009
* Neil Fortner <nfortne2@hdfgroup.org>
*
@@ -148,6 +148,10 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
if(1 != H5O_link(root_loc.oloc, 1, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)")
+ /* Decrement refcount on root group's object header in memory */
+ if(H5O_dec_rc_by_loc(root_loc.oloc, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to decrement refcount on root group's object header")
+
/* Mark superblock dirty, so root group info is flushed */
sblock_dirty = TRUE;