From: Wolfgang Bumiller Date: Mon, 15 Apr 2013 19:05:59 +0000 (+0200) Subject: ast_expression_delete: delete varparam if it is set - fixes another leak X-Git-Tag: before-library~59 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1f667c4b3521378f89738a4bc8a96f32636fac4c;p=xonotic%2Fgmqcc.git ast_expression_delete: delete varparam if it is set - fixes another leak --- diff --git a/ast.c b/ast.c index 039beb1..22c4def 100644 --- a/ast.c +++ b/ast.c @@ -87,6 +87,8 @@ static void ast_expression_delete(ast_expression *self) ast_delete(self->expression.params[i]); } vec_free(self->expression.params); + if (self->expression.varparam) + ast_delete(self->expression.varparam); } static void ast_expression_delete_full(ast_expression *self) diff --git a/parser.c b/parser.c index db71454..088cbff 100644 --- a/parser.c +++ b/parser.c @@ -4791,6 +4791,8 @@ static ast_value *parse_parameter_list(parser_t *parser, ast_value *var) on_error: if (argcounter) mem_d(argcounter); + if (varparam) + ast_delete(varparam); ast_delete(var); for (i = 0; i < vec_size(params); ++i) ast_delete(params[i]);