From 55d9b66ef9ff667af66b9ab34f806119da463ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 30 Mar 2022 21:50:19 +0200 Subject: [PATCH] :bomb: free new template fdef on eaarly failure --- src/parse/func_resolve_tmpl.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.43.0