From a6421f874b7e2c7a14d0f521f10252f8341145e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 Aug 2021 21:22:48 +0200 Subject: [PATCH] :art: Fix bug with foreach (fix freeing) --- src/clean.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clean.c b/src/clean.c index 71fd2bde..f124e059 100644 --- a/src/clean.c +++ b/src/clean.c @@ -164,7 +164,7 @@ ANN static void clean_stmt_each(Clean *a, Stmt_Each b) { clean_exp(a, b->exp); clean_stmt(a, b->body); // if (b->v) value_remref(b->v, a->gwion); - if (b->v) mp_free(a->gwion->mp, Value, b); + if (b->v) mp_free(a->gwion->mp, Value, b->v); if (b->idx) clean_idx(a, b->idx); --a->scope; } -- 2.43.0