summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 295828e..33338f4 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -1288,10 +1288,9 @@ H5G_close(H5G_t *grp)
if (H5O_close(&(grp->ent)) < 0) {
HRETURN_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close");
}
+ H5MM_xfree (grp);
}
--grp->nref;
- if(grp->nref==0)
- H5MM_xfree(grp);
FUNC_LEAVE(SUCCEED);
}