]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
fix a leak: delete the output string of macro calls
authorWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 09:45:55 +0000 (10:45 +0100)
committerWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 09:45:55 +0000 (10:45 +0100)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index d9197e5ec9a6150f1b362f0c1bc256b32d515258..10c945ecd9a666c030ee454792483e7978f3b30b 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -652,11 +652,13 @@ static bool ftepp_macro_expand(ftepp_t *ftepp, ppmacro *macro, macroparam *param
     ftepp->lex = inlex;
     ftepp_recursion_header(ftepp);
     if (!ftepp_preprocess(ftepp)) {
     ftepp->lex = inlex;
     ftepp_recursion_header(ftepp);
     if (!ftepp_preprocess(ftepp)) {
+        vec_free(ftepp->lex->open_string);
         old_string = ftepp->output_string;
         lex_close(ftepp->lex);
         retval = false;
         goto cleanup;
     }
         old_string = ftepp->output_string;
         lex_close(ftepp->lex);
         retval = false;
         goto cleanup;
     }
+    vec_free(ftepp->lex->open_string);
     ftepp_recursion_footer(ftepp);
     old_string = ftepp->output_string;
 
     ftepp_recursion_footer(ftepp);
     old_string = ftepp->output_string;