mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-23 17:29:23 +08:00
outmacho: macho_dbg_linenum -- fix memory leak
In 78f14ab1a6
the fix
is incomplete, we should move free procedure out of
the list_for_each traverse.
CID 1432930
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
5e587fda09
commit
19ab41466b
@ -2137,12 +2137,13 @@ static void macho_dbg_linenum(const char *file_name, int32_t line_num, int32_t s
|
||||
}
|
||||
}
|
||||
|
||||
if(need_new_list) {
|
||||
if (need_new_list)
|
||||
new_file_list(cur_file, cur_dir);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!need_new_list) {
|
||||
nasm_free((void *)cur_file);
|
||||
nasm_free((void *)cur_dir);
|
||||
}
|
||||
}
|
||||
|
||||
dbg_immcall = true;
|
||||
|
Loading…
Reference in New Issue
Block a user