mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Expr: fix memory leak in RecordConstructorExpr::InitVal()
This commit is contained in:
parent
5468fae8e0
commit
0a0884edb4
1 changed files with 1 additions and 3 deletions
|
@ -3142,12 +3142,10 @@ Val* RecordConstructorExpr::InitVal(const BroType* t, Val* aggr) const
|
||||||
{
|
{
|
||||||
RecordVal* rv = v->AsRecordVal();
|
RecordVal* rv = v->AsRecordVal();
|
||||||
RecordVal* ar = rv->CoerceTo(t->AsRecordType(), aggr);
|
RecordVal* ar = rv->CoerceTo(t->AsRecordType(), aggr);
|
||||||
|
Unref(rv);
|
||||||
|
|
||||||
if ( ar )
|
if ( ar )
|
||||||
{
|
|
||||||
Unref(rv);
|
|
||||||
return ar;
|
return ar;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Error("bad record initializer");
|
Error("bad record initializer");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue