diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-12-27 17:17:31 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-12-27 17:17:31 -0800 |
commit | 84d7d80451afa2671486804dfccd6eb8e8125a11 (patch) | |
tree | 5c069c902f901af7e50a9c1a25ea48b48aabb17f /core/uemis-downloader.c | |
parent | ecd8580de9fc290a407207487994d0a0cf1ab7c2 (diff) | |
download | subsurface-84d7d80451afa2671486804dfccd6eb8e8125a11.tar.gz |
Cleanup: avoid memory leak
Coverity CID 45078
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/uemis-downloader.c')
-rw-r--r-- | core/uemis-downloader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/uemis-downloader.c b/core/uemis-downloader.c index 53aa6dada..3adb436d1 100644 --- a/core/uemis-downloader.c +++ b/core/uemis-downloader.c @@ -615,7 +615,9 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in, if (!ismulti) { snprintf(fl, 13, "ANS%d.TXT", filenr - 1); - ans_path = build_filename(build_filename(path, "ANS"), fl); + char *intermediate = build_filename(path, "ANS"); + ans_path = build_filename(intermediate, fl); + free(intermediate); ans_file = subsurface_open(ans_path, O_RDONLY, 0666); free(ans_path); size = bytes_available(ans_file); |