From 9d2c4849898ed6e7a0e634efa852d7a172309ce7 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 23 Jun 2019 15:48:35 +0200 Subject: [PATCH] :art: Poolize compile args --- src/compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.43.0