summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-12-20 04:30:50 (GMT)
committerGitHub <noreply@github.com>2020-12-20 04:30:50 (GMT)
commit5025d8160f539961d8cec4e9d9e01fc717f891b6 (patch)
treed2781b5a0c42f62946bedca1b59da99a35a0a315 /tools
parent5e1ae415b8e84f8e95cf5f88a63fdcbba3dd2f6e (diff)
downloadhdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.zip
hdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.tar.gz
hdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.tar.bz2
Fixes a small memory leak in the h5jam test (#207)
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5jam/getub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index 9e9cd4d..80e0c66 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -138,14 +138,15 @@ main(int argc, const char *argv[])
} /* end if */
/* close things and exit */
+ HDfree(filename);
HDfree(buf);
HDclose(fd);
return EXIT_SUCCESS;
error:
- if (buf)
- HDfree(buf);
+ HDfree(filename);
+ HDfree(buf);
if (fd >= 0)
HDclose(fd);
return EXIT_FAILURE;