mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 10:41:43 +00:00
ast_expression_delete: delete varparam if it is set - fixes another leak
This commit is contained in:
parent
d5e90a17f9
commit
1f667c4b35
2 changed files with 4 additions and 0 deletions
2
ast.c
2
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)
|
||||
|
|
2
parser.c
2
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]);
|
||||
|
|
Loading…
Reference in a new issue