mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Expr: fix two memory leaks in AssignExpr::InitVal()
This commit is contained in:
parent
32786c7645
commit
3b09bb9e46
1 changed files with 4 additions and 0 deletions
|
@ -2480,7 +2480,11 @@ Val* AssignExpr::InitVal(const BroType* t, Val* aggr) const
|
||||||
Val* index = op1->InitVal(tt->Indices(), 0);
|
Val* index = op1->InitVal(tt->Indices(), 0);
|
||||||
Val* v = op2->InitVal(yt, 0);
|
Val* v = op2->InitVal(yt, 0);
|
||||||
if ( ! index || ! v )
|
if ( ! index || ! v )
|
||||||
|
{
|
||||||
|
Unref(index);
|
||||||
|
Unref(tv);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! tv->ExpandAndInit(index, v) )
|
if ( ! tv->ExpandAndInit(index, v) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue