From 5c6bf203eb6ac7f136bc7243ca3ccaebd8778d6c Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 4 Nov 2002 09:10:57 +0000 Subject: [PATCH] Duplicate filename to ensure no double-frees occur. svn path=/trunk/yasm/; revision=803 --- modules/preprocs/nasm/nasm-pp.c | 2 +- src/preprocs/nasm/nasm-pp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c index 8b7278b1..d5095df0 100644 --- a/modules/preprocs/nasm/nasm-pp.c +++ b/modules/preprocs/nasm/nasm-pp.c @@ -4229,7 +4229,7 @@ pp_getline(void) if (i->next) { nasm_src_set_linnum(i->lineno); - nasm_free(nasm_src_set_fname(i->fname)); + nasm_free(nasm_src_set_fname(nasm_strdup(i->fname))); } istk = i->next; list->downlevel(LIST_INCLUDE); diff --git a/src/preprocs/nasm/nasm-pp.c b/src/preprocs/nasm/nasm-pp.c index 8b7278b1..d5095df0 100644 --- a/src/preprocs/nasm/nasm-pp.c +++ b/src/preprocs/nasm/nasm-pp.c @@ -4229,7 +4229,7 @@ pp_getline(void) if (i->next) { nasm_src_set_linnum(i->lineno); - nasm_free(nasm_src_set_fname(i->fname)); + nasm_free(nasm_src_set_fname(nasm_strdup(i->fname))); } istk = i->next; list->downlevel(LIST_INCLUDE); -- 2.40.0