tccgen: free inline functions correctly
This commit is contained in:
parent
697f9e305d
commit
0d34c2136e
1 changed files with 5 additions and 1 deletions
6
tccgen.c
6
tccgen.c
|
@ -4945,13 +4945,17 @@ static void gen_inline_functions(void)
|
||||||
gen_function(sym);
|
gen_function(sym);
|
||||||
macro_ptr = NULL; /* fail safe */
|
macro_ptr = NULL; /* fail safe */
|
||||||
|
|
||||||
tok_str_free(str);
|
|
||||||
inline_generated = 1;
|
inline_generated = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!inline_generated)
|
if (!inline_generated)
|
||||||
break;
|
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);
|
dynarray_reset(&tcc_state->inline_fns, &tcc_state->nb_inline_fns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue