summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-03-09 21:12:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-03-09 21:12:04 (GMT)
commit0ff7a2d6e8ac0ddb691cef116027014b60db62f2 (patch)
tree7bd567d670ce6cc9f3d79b17e1a82616e98036f4 /tools/h5dump
parenta76a2e1620ef976d57f36b369e597150317606f9 (diff)
downloadhdf5-0ff7a2d6e8ac0ddb691cef116027014b60db62f2.zip
hdf5-0ff7a2d6e8ac0ddb691cef116027014b60db62f2.tar.gz
hdf5-0ff7a2d6e8ac0ddb691cef116027014b60db62f2.tar.bz2
[svn-r20218] Valgrind fix for memory leak in print_datatype which used an allocation function in a printf().
Tested: local linux and valgrind
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 5f4842a..571a05a 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1164,7 +1164,9 @@ print_datatype(hid_t type,unsigned in_group)
indentation(indent + COL);
printf("H5T_OPAQUE;\n");
indentation(indent + COL);
- printf("OPAQUE_TAG \"%s\";\n", H5Tget_tag(type));
+ mname = H5Tget_tag(type);
+ printf("OPAQUE_TAG \"%s\";\n", mname);
+ free(mname);
indentation(indent);
break;