From b84693e5463eb01b3be011960a953dfb0da920f7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Feb 2020 21:08:44 +0100 Subject: [PATCH] Func: fix memory leaks in get_func_priority() --- src/Func.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Func.cc b/src/Func.cc index 3b385b11f5..639d69f685 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -876,11 +876,13 @@ static int get_func_priority(const attr_list& attrs) if ( ! IsIntegral(v->Type()->Tag()) ) { + Unref(v); a->Error("expression is not of integral type"); continue; } priority = v->InternalInt(); + Unref(v); } return priority;