From a4fd4c4b493a0083a28f51b99f15bdfd59199b53 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 26 Jul 2022 18:35:49 +0200 Subject: [PATCH] :bug: Fix cleaning --- src/env/env.c | 2 +- src/gwion.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/env/env.c b/src/env/env.c index 2f13a128..ded3a4f7 100644 --- a/src/env/env.c +++ b/src/env/env.c @@ -81,8 +81,8 @@ ANN void env_add_effect(const Env a, const Symbol effect, const loc_t pos) { } ANN void free_env(const Env a) { - free_env_scope(a->scope, a->gwion); pop_global(a->gwion); + free_env_scope(a->scope, a->gwion); mp_free(a->gwion->mp, Env, a); } diff --git a/src/gwion.c b/src/gwion.c index 4ca0239d..1c28cca0 100644 --- a/src/gwion.c +++ b/src/gwion.c @@ -243,7 +243,8 @@ ANN void push_global(struct Gwion_ *gwion, const m_str name) { } ANN void pop_global(const Gwion gwion) { - Nspc nspc = gwion->env->global_nspc, parent; + Nspc nspc = gwion->env->global_nspc->parent, parent; +// Nspc nspc = gwion->env->global_nspc, parent; do { parent = nspc->parent; nspc_remref(nspc, gwion); -- 2.43.0