summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2002-09-18 15:51:29 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2002-09-18 15:51:29 (GMT)
commit2aca3b77d63aa78d16262e23d929f2c13570a2d5 (patch)
tree54bf519b70e182e1628754915bca5cea24f71658 /src/H5Gnode.c
parentd32ad090439ad97af135a269a60dbbff430b84da (diff)
downloadhdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.zip
hdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.tar.gz
hdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.tar.bz2
[svn-r5929]
Purpose: bug fix Description: memory leak regarding the ID to name buffer Solution: added a new function H5G_free_ent_name that is called on several places of the library Platforms tested: windows 2000 linux, with cpp solaris, with fortran, cpp irix64, with parallel, fortran
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 90623c3..7ad68e3 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -323,6 +323,10 @@ done:
* Quincey Koziol, 2002-7-180
* 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.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -397,6 +401,12 @@ 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]));
+ }
+
sym->entry = H5FL_ARR_FREE(H5G_entry_t,sym->entry);
H5FL_FREE(H5G_node_t,sym);
}
@@ -881,6 +891,10 @@ done:
* Modifications:
* 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.
+ *
*-------------------------------------------------------------------------
*/
static H5B_ins_t
@@ -945,6 +959,9 @@ 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);
+
/* Remove the entry from the symbol table node */
if (1==sn->nsyms) {
/*