From 0ff7a2d6e8ac0ddb691cef116027014b60db62f2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 9 Mar 2011 16:12:04 -0500 Subject: [svn-r20218] Valgrind fix for memory leak in print_datatype which used an allocation function in a printf(). Tested: local linux and valgrind --- tools/h5dump/h5dump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v0.12