From: fennecdjay Date: Sun, 23 Jun 2019 12:39:27 +0000 (+0200) Subject: :art: Poolize context->name X-Git-Tag: nightly~2399 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=aae1ddd69ba2e43114985fcc83d27968c30185c4;p=gwion.git :art: Poolize context->name --- 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);