summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-09 02:06:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-09 02:06:29 (GMT)
commitfe76fb1b580aa99fa26ccb26da88ce7e16b35a84 (patch)
treeb90b9832ec612a2d7efead8c6bea6c767edc5b15 /src/H5G.c
parentd5c705a642a1ed06fa8dcaa25b61aa75687799d2 (diff)
downloadhdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.zip
hdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.tar.gz
hdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.tar.bz2
[svn-r8844] Purpose:
Bug fix Description: The "shared" raw B-tree node can get freed before all the B-tree nodes had been flushed out to disk and released by the cache. Solution: Implement a simple reference counting wrapper for objects in the library and use it to hold the shared raw B-tree nodes so they aren't freed before all references to them in memory are released. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) IRIX64 6.5 (modei4)
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5G.c b/src/H5G.c
index ee3d5a4..27f43e8 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -1524,6 +1524,7 @@ done:
/* If we started with a NULL grp_ent and we copied something into it, free the entry information */
if(null_grp && group_copy)
H5G_free_ent_name(grp_ent);
+
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -1661,6 +1662,10 @@ H5G_mkroot (H5F_t *f, hid_t dxpl_id, H5G_entry_t *ent)
if (f->shared->root_grp)
HGOTO_DONE(SUCCEED);
+ /* Create information needed for group nodes */
+ if(H5G_node_init(f)<0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info")
+
/*
* If there is no root object then create one. The root group always has
* a hard link count of one since it's pointed to by the boot block.