diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-09-06 18:54:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-09-06 18:54:16 (GMT) |
commit | b0d47e55f7a9274cc18458756b4e48dd8169ea43 (patch) | |
tree | 27a42b859d1772f63881b911924201fc2987f94a /src/H5Gnode.c | |
parent | bd346629483722e7bae94521a33df4ec7a58bf0b (diff) | |
download | hdf5-b0d47e55f7a9274cc18458756b4e48dd8169ea43.zip hdf5-b0d47e55f7a9274cc18458756b4e48dd8169ea43.tar.gz hdf5-b0d47e55f7a9274cc18458756b4e48dd8169ea43.tar.bz2 |
[svn-r7446] Purpose:
Code cleanup/bug fix
Description:
Move metadata cache calls around a bit so they protect the usage of the
metadata better.
Platforms tested:
FreeBSD 4.9 (sleipnir)
too small to need h5committest
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r-- | src/H5Gnode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c index d70a5c0..423ed57 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -1009,8 +1009,9 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key, } } - if (snrt && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, FALSE) != SUCCEED) + if (H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, FALSE) != SUCCEED) HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node"); + snrt=NULL; /* Make certain future references will be caught */ } else { /* Where to insert the new entry? */ ret_value = H5B_INS_NOOP; @@ -1289,6 +1290,7 @@ H5G_node_iterate (H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, H5B_ITER_ERROR, "memory allocation failed"); for (i=0; i<nsyms; i++) name_off[i] = sn->entry[i].name_off; + sn=NULL; /* Make certain future references will be caught */ /* * Iterate over the symbol table node entries. @@ -1361,6 +1363,7 @@ H5G_node_sumup(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, if (NULL == (sn = H5AC_find(f, dxpl_id, H5AC_SNODE, addr, NULL, NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_ITER_ERROR, "unable to load symbol table node"); *num_objs += sn->nsyms; + sn=NULL; /* Make certain future references will be caught */ done: FUNC_LEAVE_NOAPI(ret_value); @@ -1418,6 +1421,7 @@ H5G_node_name(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, } bt_udata->num_objs += sn->nsyms; + sn=NULL; /* Make certain future references will be caught */ done: FUNC_LEAVE_NOAPI(ret_value); @@ -1466,6 +1470,7 @@ H5G_node_type(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, } bt_udata->num_objs += sn->nsyms; + sn=NULL; /* Make certain future references will be caught */ done: FUNC_LEAVE_NOAPI(ret_value); |