mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: avoid memory leak
Coverity CID 45078 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ecd8580de9
commit
84d7d80451
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue