mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-01 04:10:42 +00:00
fix a leak: delete the output string of macro calls
This commit is contained in:
parent
dce7a0c72b
commit
3c212c8389
1 changed files with 2 additions and 0 deletions
2
ftepp.c
2
ftepp.c
|
@ -652,11 +652,13 @@ static bool ftepp_macro_expand(ftepp_t *ftepp, ppmacro *macro, macroparam *param
|
||||||
ftepp->lex = inlex;
|
ftepp->lex = inlex;
|
||||||
ftepp_recursion_header(ftepp);
|
ftepp_recursion_header(ftepp);
|
||||||
if (!ftepp_preprocess(ftepp)) {
|
if (!ftepp_preprocess(ftepp)) {
|
||||||
|
vec_free(ftepp->lex->open_string);
|
||||||
old_string = ftepp->output_string;
|
old_string = ftepp->output_string;
|
||||||
lex_close(ftepp->lex);
|
lex_close(ftepp->lex);
|
||||||
retval = false;
|
retval = false;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
vec_free(ftepp->lex->open_string);
|
||||||
ftepp_recursion_footer(ftepp);
|
ftepp_recursion_footer(ftepp);
|
||||||
old_string = ftepp->output_string;
|
old_string = ftepp->output_string;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue