mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-31 18:20:22 +08:00
preproc.c: Don't forget to dup filename before free
src_set_fname simply gets copy of pointer (ideally we need refcounting here) so don't pass the name which will be freed soon but rather pass a copy. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
91a65ba2b7
commit
d34a1085b5
@ -5006,7 +5006,7 @@ static char *pp_getline(void)
|
||||
/* only set line and file name if there's a next node */
|
||||
if (i->next) {
|
||||
src_set_linnum(i->lineno);
|
||||
nasm_free(src_set_fname(i->fname));
|
||||
nasm_free(src_set_fname(nasm_strdup(i->fname)));
|
||||
}
|
||||
istk = i->next;
|
||||
list->downlevel(LIST_INCLUDE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user