summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-08 19:17:57 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-08 19:17:57 -0800
commit43f11a93385c4848bfad49510bdea2849f241816 (patch)
treeaafe396ad077acc6be6bef1d77a65d517cd30cf4 /src/main.c
parent19367a27472a06634424e56c1eb21e4f53da4e9e (diff)
add some frees; still need to fix high amounts of memory leakage
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 1d68cdb..858334b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -167,7 +167,8 @@ int main(int argc, char **argv) {
ast_t *root = eval(visitor);
/* print_root(root); */
ast_free(root);
- free(visitor);
+ ast_free(visitor->root);
+ visitor_free(visitor);
hash_table_free(parser->symbol_table);
parser_free(parser);
free(lexer);