tccgen: free inline functions correctly

This commit is contained in:
grischka 2009-07-14 04:46:35 +02:00
parent 697f9e305d
commit 0d34c2136e

View File

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