From 9d05a0a96a8dd3deea42742662a7240dc2d816ff Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 23 Jun 2019 14:47:40 +0200 Subject: [PATCH] :art: Poolize plug args --- src/plug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plug.c b/src/plug.c index 9dea63a7..b0c5ac00 100644 --- a/src/plug.c +++ b/src/plug.c @@ -118,10 +118,10 @@ void free_plug(const Gwion gwion) { ANN Vector split_args(MemPool p, const m_str str) { const m_str arg = strchr(str, '='); - m_str d = strdup(arg+1), c = d; + m_str d = mstrdup(p, arg+1), c = d; const Vector args = new_vector(p); while(d) - vector_add(args, (vtype)strdup(strsep(&d, ","))); + vector_add(args, (vtype)mstrdup(p, strsep(&d, ","))); free(d); free(c); return args; @@ -147,7 +147,7 @@ void plug_run(const Gwion gwion, const Vector args) { plug->self = plug->ini(gwion, arg); if(arg) { for(m_uint i = 0; i < vector_size(arg); ++i) - xfree((m_str)vector_at(arg, i)); + free_mstr(gwion->mp, (m_str)vector_at(arg, i)); free_vector(gwion->mp, arg); } } -- 2.43.0