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/h5dump/h5dump_xml.c | |
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/h5dump/h5dump_xml.c')
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index b94879c..c081ee0 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -1216,7 +1216,7 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sOpaqueType Tag=\"%s\" ",xmlnsprefix, mname); - HDfree(mname); + H5free_memory(mname); size = H5Tget_size(type); h5tools_str_append(&buffer, "Size=\"%lu\"/>", (unsigned long)size); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); @@ -1265,7 +1265,7 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_str_append(&buffer, "<%sField FieldName=\"%s\">",xmlnsprefix, t_fname); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - HDfree(mname); + H5free_memory(mname); HDfree(t_fname); dump_indent += COL; ctx.indent_level++; @@ -3623,7 +3623,8 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", name); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - + if(name) + H5free_memory(name); ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -4526,7 +4527,7 @@ xml_print_enum(hid_t type) /* Release resources */ for (i = 0; i < nmembs; i++) - HDfree(name[i]); + H5free_memory(name[i]); HDfree(name); HDfree(value); |