From 8dcfd883c76b248fcafea2bda6e71acac9e7c052 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 3 Mar 2011 09:18:56 +0300 Subject: [PATCH] preproc.c: Fix use-after-free bug Signed-off-by: Cyrill Gorcunov --- preproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preproc.c b/preproc.c index 2f3dda4a..75f99808 100644 --- a/preproc.c +++ b/preproc.c @@ -5324,12 +5324,12 @@ static void pp_cleanup(int pass) istk = istk->next; fclose(i->fp); nasm_free(i->fname); - nasm_free(i); while (i->expansion != NULL) { ExpInv *ei = i->expansion; i->expansion = ei->prev; free_expinv(ei); } + nasm_free(i); } while (cstk) ctx_pop(); -- 2.11.4.GIT