From: fennecdjay Date: Sun, 23 Jun 2019 13:48:35 +0000 (+0200) Subject: :art: Poolize compile args X-Git-Tag: nightly~2391 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9d2c4849898ed6e7a0e634efa852d7a172309ce7;p=gwion.git :art: Poolize compile args --- diff --git a/src/compile.c b/src/compile.c index 9bb3ecf6..17b55bbf 100644 --- a/src/compile.c +++ b/src/compile.c @@ -34,7 +34,7 @@ static void compiler_name(MemPool p, struct Compiler* c) { if(d) c->args = new_vector(p); while(d) - vector_add(c->args, (vtype)strdup(strsep(&d, ":"))); + vector_add(c->args, (vtype)mstrdup(p, strsep(&d, ":"))); free(d); } @@ -43,7 +43,7 @@ static inline void compiler_error(MemPool p, const struct Compiler* c) { for(m_uint i = 0; i < vector_size(c->args); ++i) { const m_str str = (m_str)vector_at(c->args, i); if(str) - xfree((m_str)vector_at(c->args, i)); + free_mstr(p, (m_str)vector_at(c->args, i)); } free_vector(p, c->args); }