mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Cleanup: fix memory leak on failed DLF import
In the case of a failed dlf import, the memory of the read-in file was not freed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7ae1b8cb11
commit
b6187f73aa
1 changed files with 3 additions and 5 deletions
|
@ -335,11 +335,9 @@ int parse_file(const char *filename)
|
||||||
|
|
||||||
/* Divesoft Freedom */
|
/* Divesoft Freedom */
|
||||||
if (fmt && (!strcasecmp(fmt + 1, "DLF"))) {
|
if (fmt && (!strcasecmp(fmt + 1, "DLF"))) {
|
||||||
if (!parse_dlf_buffer(mem.buffer, mem.size)) {
|
ret = parse_dlf_buffer(mem.buffer, mem.size);
|
||||||
free(mem.buffer);
|
free(mem.buffer);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DataTrak/Wlog */
|
/* DataTrak/Wlog */
|
||||||
|
|
Loading…
Add table
Reference in a new issue