From: fennecdjay Date: Sun, 23 Jun 2019 12:47:40 +0000 (+0200) Subject: :art: Poolize plug args X-Git-Tag: nightly~2395 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9d05a0a96a8dd3deea42742662a7240dc2d816ff;p=gwion.git :art: Poolize plug args --- 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); } }