From 3018ceaacf334d0da938c9d3cd35ec8b06b4bf90 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov <gorcunov@gmail.com> Date: Wed, 26 Jul 2017 01:21:16 +0300 Subject: [PATCH 3/3] 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 <gorcunov@gmail.com> --- preproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preproc.c b/preproc.c index f6e296b4..0d0e1040 100644 --- a/preproc.c +++ b/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 */ -- 2.13.3