mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Expr: fix memory leaks in AssignExpr::EvalIntoAggregate()
This commit is contained in:
parent
65c4f34385
commit
5468fae8e0
1 changed files with 4 additions and 0 deletions
|
@ -2404,7 +2404,11 @@ void AssignExpr::EvalIntoAggregate(const BroType* t, Val* aggr, Frame* f) const
|
|||
Val* index = op1->Eval(f);
|
||||
Val* v = check_and_promote(op2->Eval(f), t->YieldType(), 1);
|
||||
if ( ! index || ! v )
|
||||
{
|
||||
Unref(index);
|
||||
Unref(v);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! tv->Assign(index, v) )
|
||||
RuntimeError("type clash in table assignment");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue