summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2011-03-21 23:02:31 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2011-03-21 23:02:31 (GMT)
commitf92d2371ffce9ec664833187cadb0223fa1dc1c2 (patch)
tree0de52b34d30672f563ece49177cc117d91127005 /tools/lib/h5diff_attr.c
parent0fcb094698374a1c5eb218030d14ca3071c049ca (diff)
downloadhdf5-f92d2371ffce9ec664833187cadb0223fa1dc1c2.zip
hdf5-f92d2371ffce9ec664833187cadb0223fa1dc1c2.tar.gz
hdf5-f92d2371ffce9ec664833187cadb0223fa1dc1c2.tar.bz2
[svn-r20285] Purpose:
Improve the previous fix for Bug 2216 - GMQS: h5diff - memory leak when compares vlen string in dataset or attributes Description: Related to the previous checkin r20270 and r20266. Improve h5tools_detect_vlen() code for better performance. H5Tdetect_class already recusive on given type so don't need to be part of recusive call again. Also improve error handlings in h5tools_detect_vlen and h5tools_detect_vlen_str functions. Also updated h5ls and h5dump code accordingly. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 01fa896..097c809 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -223,12 +223,12 @@ hsize_t diff_attr(hid_t loc1_id,
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
- if(TRUE == h5tools_detect_vlen_data(mtype1_id))
+ if(TRUE == h5tools_detect_vlen(mtype1_id))
H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
buf1 = NULL;
- if(TRUE == h5tools_detect_vlen_data(mtype2_id))
+ if(TRUE == h5tools_detect_vlen(mtype2_id))
H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
buf2 = NULL;
@@ -258,12 +258,12 @@ hsize_t diff_attr(hid_t loc1_id,
error:
H5E_BEGIN_TRY {
if(buf1) {
- if(TRUE == h5tools_detect_vlen_data(mtype1_id))
+ if(TRUE == h5tools_detect_vlen(mtype1_id))
H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
} /* end if */
if(buf2) {
- if(TRUE == h5tools_detect_vlen_data(mtype2_id))
+ if(TRUE == h5tools_detect_vlen(mtype2_id))
H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
} /* end if */