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.
This commit is contained in:
grischka
2016-11-11 18:29:45 +01:00
parent 7e7f2e5d1b
commit 7c28c9b13f
3 changed files with 11 additions and 10 deletions

View File

@ -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);
}
}