From 59216d3db0bbf8c213124587c5549dc6025f2af2 Mon Sep 17 00:00:00 2001 From: grischka Date: Fri, 11 Nov 2016 20:25:13 +0100 Subject: tccgen: fix inline_functions double free fix --- tccgen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index 427649b..ba1757e 100644 --- a/tccgen.c +++ b/tccgen.c @@ -6544,10 +6544,8 @@ ST_FUNC void free_inline_functions(TCCState *s) /* free tokens of unused inline functions */ for (i = 0; i < s->nb_inline_fns; ++i) { struct InlineFunc *fn = s->inline_fns[i]; - if (fn->sym) { - tok_str_free(fn->func_str->str); - tal_free(tokstr_alloc, fn->func_str); - } + if (fn->sym) + tok_str_free(fn->func_str); } dynarray_reset(&s->inline_fns, &s->nb_inline_fns); } -- cgit v1.3.1