aboutsummaryrefslogtreecommitdiff
path: root/src/parser/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/ast.c')
-rw-r--r--src/parser/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser/ast.c b/src/parser/ast.c
index f9f857d..704e9a4 100644
--- a/src/parser/ast.c
+++ b/src/parser/ast.c
@@ -78,6 +78,8 @@ struct Program create_program(void)
void free_program(struct Program* program)
{
+ for (size_t i = 0; i < program->const_count; i += 1)
+ free_expr(program->consts[i].value);
free(program->consts);
free(program->data_decls);