From 78bd057c370a66b7776ddf17516448fa2be39503 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Wed, 9 Feb 2022 20:44:21 +0100 Subject: [PATCH] eval.c: Free the stack with FREE_LIST instead of FREE_OBJ This way we pass the correct oldsize to the allocator. --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index baa8c22..8e07b39 100644 --- a/src/eval.c +++ b/src/eval.c @@ -349,7 +349,7 @@ apfl_ctx_destroy(apfl_ctx ctx) while (ctx->stack_len > 0) { stack_must_drop(ctx, -1); } - FREE_OBJ(ctx->allocator, ctx->stack); + FREE_LIST(ctx->allocator, ctx->stack, ctx->stack_cap); FREE_OBJ(ctx->allocator, ctx); }