diff --git a/tccgen.c b/tccgen.c index 65db0ac..99ec723 100644 --- a/tccgen.c +++ b/tccgen.c @@ -4945,13 +4945,17 @@ static void gen_inline_functions(void) gen_function(sym); macro_ptr = NULL; /* fail safe */ - tok_str_free(str); inline_generated = 1; } } if (!inline_generated) break; } + for (i = 0; i < tcc_state->nb_inline_fns; ++i) { + fn = tcc_state->inline_fns[i]; + str = fn->token_str; + tok_str_free(str); + } dynarray_reset(&tcc_state->inline_fns, &tcc_state->nb_inline_fns); }