Fixed memory leak.

This commit is contained in:
Jacob Signorovitch 2025-05-24 10:52:27 -04:00
parent 0fb1f1d55f
commit f5ab0e9cb0
2 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,8 @@ void ast_destroy_psv(AST* ast) {
default:
log_dbgf("Unknown ast type %d (max: %d)", ast->type, AST_TYPE_MAX);
}
free(ast);
}
void ast_print(AST* ast) { ast_print_i(ast, 0); }

View File

@ -25,7 +25,6 @@ void* gc_alloc(size_t sz, GCType type) {
void gc_hack_free() {
while (gclist) {
log_dbgf("freeing %p", gclist);
GC* gc = gclist;
gclist = gclist->nxt;
switch (gc->type) {