From a327c65d28fa31f924166f3b5da7feaa73cc124c Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 14 Feb 2010 17:19:38 +0300 Subject: preproc.c: Fix SIGSEV on missed %endm In case if EOF is reached (or due to any other case pp_cleanup is being called) we do free "defining" macro but forgot to set pointer to NULL itself which leads to attempt to free memory again for this macro on further pp_cleanup calls. --- preproc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/preproc.c b/preproc.c index fcec93d6..bbe2dae9 100644 --- a/preproc.c +++ b/preproc.c @@ -4804,6 +4804,7 @@ static void pp_cleanup(int pass) } free_mmacro(defining); + defining = NULL; } while (cstk) ctx_pop(); -- cgit v1.2.1