From aae1ddd69ba2e43114985fcc83d27968c30185c4 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 23 Jun 2019 14:39:27 +0200 Subject: [PATCH] :art: Poolize context->name --- src/oo/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oo/context.c b/src/oo/context.c index 45695dfc..27164bd8 100644 --- a/src/oo/context.c +++ b/src/oo/context.c @@ -11,13 +11,13 @@ ANN static void free_context(const Context a, Gwion gwion) { REM_REF(a->nspc, gwion) - xfree(a->name); + free_mstr(gwion->mp, a->name); mp_free(gwion->mp, Context, a); } ANN2(2) Context new_context(MemPool p, const Ast ast, const m_str str) { const Context context = mp_calloc(p, Context); - context->name = strdup(str); + context->name = mstrdup(p, str); context->nspc = new_nspc(p, context->name); context->tree = ast; context->ref = new_refcount(p, free_context); -- 2.43.0