]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
fix a leak on a parse-error
authorWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 20:25:58 +0000 (22:25 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 21:36:05 +0000 (23:36 +0200)
parser.c

index 14d58b645ad80e90b1b8844b73b5e7aea459d12c..bedef2bb73e83ffdab8c82ee56a26be6a31fd027 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4793,6 +4793,7 @@ static ast_value *parse_parameter_list(parser_t *parser, ast_value *var)
 
     /* for the sake of less code we parse-in in this function */
     if (!parser_next(parser)) {
+        ast_delete(var);
         parseerror(parser, "expected parameter list");
         return NULL;
     }