mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Func: fix memory leaks in get_func_priority()
This commit is contained in:
parent
80d6bbc4dc
commit
b84693e546
1 changed files with 2 additions and 0 deletions
|
@ -876,11 +876,13 @@ static int get_func_priority(const attr_list& attrs)
|
||||||
|
|
||||||
if ( ! IsIntegral(v->Type()->Tag()) )
|
if ( ! IsIntegral(v->Type()->Tag()) )
|
||||||
{
|
{
|
||||||
|
Unref(v);
|
||||||
a->Error("expression is not of integral type");
|
a->Error("expression is not of integral type");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
priority = v->InternalInt();
|
priority = v->InternalInt();
|
||||||
|
Unref(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
return priority;
|
return priority;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue