diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2011-03-18 18:50:19 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2011-03-18 18:50:19 (GMT) |
commit | d697acbfb588b0406403109398105e12562e2d3e (patch) | |
tree | 8aa04d2c07a43ae2d75eea54938dc16318d444a0 /tools/h5ls/h5ls.c | |
parent | e038bf6eb718711c76a86074848e96a8158a12bd (diff) | |
download | hdf5-d697acbfb588b0406403109398105e12562e2d3e.zip hdf5-d697acbfb588b0406403109398105e12562e2d3e.tar.gz hdf5-d697acbfb588b0406403109398105e12562e2d3e.tar.bz2 |
[svn-r20270] Purpose:
Improve the previous fix for Bug 2216 - GMQS: h5diff - memory leak when
compares vlen string in dataset or attributes
Description:
Improve the fix along with the previous checkin r20266.
Add a new function to tool lib, h5tools_detect_vlen_data() which return
TRUE if include any kind of vlen data all at once, either VLEN-data or
VLEN-string and so on.
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/h5ls/h5ls.c')
-rw-r--r-- | tools/h5ls/h5ls.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d288f4b..8fa037e 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1457,10 +1457,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, unsigned int vl_data = 0; /* contains VL datatypes */ /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen_str(p_type) == TRUE) + if (h5tools_detect_vlen_data(p_type) == TRUE) vl_data = TRUE; - if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE) - vl_data = TRUE; temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); assert(temp_need == (hsize_t)((size_t)temp_need)); |