From: Jérémie Astor Date: Sun, 15 Aug 2021 19:22:48 +0000 (+0200) Subject: :art: Fix bug with foreach (fix freeing) X-Git-Tag: nightly~470^2~84 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a6421f874b7e2c7a14d0f521f10252f8341145e8;p=gwion.git :art: Fix bug with foreach (fix freeing) --- 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; }