From ab0c5259e5a3238e176e4b1aed942f5384a2d0c6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 18 Sep 2019 13:33:05 +0200 Subject: Fix leak on parse failure --- include/parser.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/parser.h b/include/parser.h index ae5cfa6..88bed93 100644 --- a/include/parser.h +++ b/include/parser.h @@ -27,8 +27,7 @@ struct Parser { LhsExpr file_decl; Scope *current_scope; bool has_func_parent; - /* Borrowed from @compiler for faster access to allocator. The allocator is thread-specific */ - ArenaAllocator *allocator; + ArenaAllocator *allocator; /* Owned */ amal_compiler *compiler; Ssa *ssa; bool started; -- cgit v1.2.3