From 5025d8160f539961d8cec4e9d9e01fc717f891b6 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Sat, 19 Dec 2020 20:30:50 -0800 Subject: Fixes a small memory leak in the h5jam test (#207) --- tools/test/h5jam/getub.c | 5 +++-- 1 file 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; -- cgit v0.12