From: Jérémie Astor Date: Wed, 30 Mar 2022 19:50:19 +0000 (+0200) Subject: :bomb: free new template fdef on eaarly failure X-Git-Tag: nightly~345 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=55d9b66ef9ff667af66b9ab34f806119da463ea2;p=gwion.git :bomb: free new template fdef on eaarly failure --- diff --git a/src/parse/func_resolve_tmpl.c b/src/parse/func_resolve_tmpl.c index aeb028dc..eddfcf0a 100644 --- a/src/parse/func_resolve_tmpl.c +++ b/src/parse/func_resolve_tmpl.c @@ -35,6 +35,7 @@ tmpl_valid(const Env env, const Func_Def fdef /*, Exp_Call *const exp*/, const m env->name = filename; const bool ret = check_traverse_fdef(env, fdef) > 0; env->name = old_file; + if(!fdef->base->func)free_func_def(env->gwion->mp, fdef); return ret; }