Free the 3 actual vectors, not the first 3 times

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-15 21:40:32 +01:00
parent 4517072af4
commit d1640f177f

4
ast.c
View file

@ -809,10 +809,10 @@ void ast_block_delete(ast_block *self)
vec_free(self->exprs); vec_free(self->exprs);
for (i = 0; i < vec_size(self->locals); ++i) for (i = 0; i < vec_size(self->locals); ++i)
ast_delete(self->locals[i]); ast_delete(self->locals[i]);
vec_free(self->exprs); vec_free(self->locals);
for (i = 0; i < vec_size(self->collect); ++i) for (i = 0; i < vec_size(self->collect); ++i)
ast_delete(self->collect[i]); ast_delete(self->collect[i]);
vec_free(self->exprs); vec_free(self->collect);
ast_expression_delete((ast_expression*)self); ast_expression_delete((ast_expression*)self);
mem_d(self); mem_d(self);
} }