summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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);