diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2014-03-31 23:35:09 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2014-03-31 23:35:09 (GMT) |
commit | d01ee66666f4cad8e5f3f67a51a5774adcc03e45 (patch) | |
tree | 1980b2237af734a2784314b85a8b8f4edbfcf14e /tools/h5ls | |
parent | ef9db69bf33a200f81ebb3e29dbcbbdab92938cf (diff) | |
download | hdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.zip hdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.tar.gz hdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.tar.bz2 |
[svn-r24937] Adds an H5free_memory() function to the library for use with
functions that return library-allocated memory. The test and tool
code were modified to use this new function where it's appropriate.
Fixes HDFFV-7710, HDFFV-8519, and HDFFV-8551
Tested on:
64-bit Windows 7 w/ VS2012
32-bit LE linux w/ parallel and fortran (jam)
32-bit LE linux w/ fortran and C++ (jam)
Diffstat (limited to 'tools/h5ls')
-rw-r--r-- | tools/h5ls/h5ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 14fdb65..33fc17a 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -845,7 +845,7 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind) n = print_string(buffer, name, FALSE); h5tools_str_append(buffer, "\"%*s +%-4lu ", MAX(0, 16-n), "", (unsigned long)H5Tget_member_offset(type, i)); - HDfree(name); + H5free_memory(name); /* Member's type */ subtype = H5Tget_member_type(type, i); @@ -927,7 +927,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) if(H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0) { /* Release resources */ for(i = 0; i < (unsigned)nmembs; i++) - HDfree(name[i]); + H5free_memory(name[i]); HDfree(name); HDfree(value); @@ -1154,7 +1154,7 @@ print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "\n%*s(tag = \"", ind, ""); print_string(buffer, tag, FALSE); h5tools_str_append(buffer, "\")"); - HDfree(tag); + H5free_memory(tag); } return TRUE; } |