From b6a173fad54f25f6e1cb0c3eaf230ac11fb6a070 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 26 Jul 2017 01:21:16 +0300 Subject: [PATCH] preproc: Free token's text if only it has been modified https://bugzilla.nasm.us/show_bug.cgi?id=3392414 Signed-off-by: Cyrill Gorcunov --- asm/preproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm/preproc.c b/asm/preproc.c index f6e296b4..0d0e1040 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -1280,8 +1280,8 @@ static char *detoken(Token * tlist, bool expand_locals) t->text = nasm_zalloc(2); } else t->text = nasm_strdup(p); + nasm_free(q); } - nasm_free(q); } /* Expand local macros here and not during preprocessing */