From eef92df09223f5c3b0c824d8550bb03f5c47ff82 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sat, 28 Apr 2012 17:29:43 +0200 Subject: [PATCH] First delete the blocks, THEN the locals, since blocks USE locals, darn --- ast.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ast.c b/ast.c index ae58b9d..c85c566 100644 --- a/ast.c +++ b/ast.c @@ -169,12 +169,12 @@ MEM_VEC_FUNCTIONS(ast_block, ast_expression*, exprs) void ast_block_delete(ast_block *self) { size_t i; - for (i = 0; i < self->locals_count; ++i) - ast_delete(self->locals[i]); - MEM_VECTOR_CLEAR(self, locals); for (i = 0; i < self->exprs_count; ++i) ast_unref(self->exprs[i]); MEM_VECTOR_CLEAR(self, exprs); + for (i = 0; i < self->locals_count; ++i) + ast_delete(self->locals[i]); + MEM_VECTOR_CLEAR(self, locals); mem_d(self); } -- 2.39.2