]> granicus.if.org Git - yasm/commitdiff
Duplicate filename to ensure no double-frees occur.
authorPeter Johnson <peter@tortall.net>
Mon, 4 Nov 2002 09:10:57 +0000 (09:10 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 4 Nov 2002 09:10:57 +0000 (09:10 -0000)
svn path=/trunk/yasm/; revision=803

modules/preprocs/nasm/nasm-pp.c
src/preprocs/nasm/nasm-pp.c

index 8b7278b10d2be59c13cd1d0102c2c53f4bf3dd01..d5095df09c714b9690a7012874a836ac03b0a5b2 100644 (file)
@@ -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);
index 8b7278b10d2be59c13cd1d0102c2c53f4bf3dd01..d5095df09c714b9690a7012874a836ac03b0a5b2 100644 (file)
@@ -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);