diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2020-12-20 04:30:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 04:30:50 (GMT) |
commit | 5025d8160f539961d8cec4e9d9e01fc717f891b6 (patch) | |
tree | d2781b5a0c42f62946bedca1b59da99a35a0a315 /tools/test | |
parent | 5e1ae415b8e84f8e95cf5f88a63fdcbba3dd2f6e (diff) | |
download | hdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.zip hdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.tar.gz hdf5-5025d8160f539961d8cec4e9d9e01fc717f891b6.tar.bz2 |
Fixes a small memory leak in the h5jam test (#207)
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5jam/getub.c | 5 |
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; |