summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 7ad68e3..ff76674 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -324,9 +324,9 @@ done:
* Added dxpl parameter to allow more control over I/O from metadata
* cache.
*
- * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002
- * Added `id to name' support.
- *
+ * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002
+ * Added `id to name' support.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -401,11 +401,9 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
* preempted from the cache.
*/
if (destroy) {
-
- /*Free the ID to name buffer */
- for (i=0; i<sym->nsyms; i++) {
- H5G_free_ent_name(&(sym->entry[i]));
- }
+ /* Free the ID to name buffer */
+ for (i=0; i<sym->nsyms; i++)
+ H5G_free_ent_name(&(sym->entry[i]));
sym->entry = H5FL_ARR_FREE(H5G_entry_t,sym->entry);
H5FL_FREE(H5G_node_t,sym);
@@ -858,7 +856,7 @@ H5G_node_insert(H5F_t *f, haddr_t addr, void UNUSED *_lt_key,
HDmemmove(insert_into->entry + idx + 1,
insert_into->entry + idx,
(insert_into->nsyms - idx) * sizeof(H5G_entry_t));
- insert_into->entry[idx] = bt_udata->ent;
+ H5G_ent_copy(&(bt_udata->ent), &(insert_into->entry[idx])); /* Deep copy the entry */
insert_into->entry[idx].dirty = TRUE;
insert_into->nsyms += 1;
@@ -889,12 +887,12 @@ done:
* Thursday, September 24, 1998
*
* Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
+ * Robb Matzke, 1999-07-28
+ * The ADDR argument is passed by value.
+ *
+ * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002
+ * Added `id to name' support.
*
- * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002
- * Added `id to name' support.
- *
*-------------------------------------------------------------------------
*/
static H5B_ins_t
@@ -959,8 +957,8 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/,
H5HL_remove(f, bt_udata->heap_addr, sn->entry[idx].name_off, HDstrlen(s)+1);
H5E_clear(); /*no big deal*/
- /*Free the ID to name buffer */
- H5G_free_ent_name(sn->entry+idx);
+ /* Free the ID to name buffer for the entry being squeezed out */
+ H5G_free_ent_name(sn->entry+idx);
/* Remove the entry from the symbol table node */
if (1==sn->nsyms) {