outmacho.c: macho_dbg_linenum - fix memory leak
If new list is not needed then we should free memory allocated by nasm_basename and nasm_dirname calls. CID 1432930 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
858bc9d6b9
commit
78f14ab1a6
1 changed files with 3 additions and 0 deletions
|
@ -2139,6 +2139,9 @@ static void macho_dbg_linenum(const char *file_name, int32_t line_num, int32_t s
|
|||
|
||||
if(need_new_list) {
|
||||
new_file_list(cur_file, cur_dir);
|
||||
} else {
|
||||
nasm_free((void *)cur_file);
|
||||
nasm_free((void *)cur_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue