From 7c28c9b13f7c924c18920b51f42b1119c3b1e2ee Mon Sep 17 00:00:00 2001 From: grischka Date: Fri, 11 Nov 2016 18:29:45 +0100 Subject: tccgen: inline_functions double free fix Fix double free of the inline function token_string which could happen when an error/longjmp occurred while compiling the inline function. --- tccpp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tccpp.c') diff --git a/tccpp.c b/tccpp.c index b75603f..0bfeaeb 100644 --- a/tccpp.c +++ b/tccpp.c @@ -1124,8 +1124,7 @@ ST_FUNC void end_macro(void) str->alloc = 3; /* just mark as finished */ } else { tok_str_free(str->str); - if (str->alloc == 1) - tal_free(tokstr_alloc, str); + tal_free(tokstr_alloc, str); } } -- cgit v1.3.1