mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Expr: fix memory leak in RecordCoerceExpr::InitVal()
Caused by commit b1fd161274
This commit is contained in:
parent
c074122f13
commit
46ecbd400e
1 changed files with 1 additions and 3 deletions
|
@ -3776,12 +3776,10 @@ Val* RecordCoerceExpr::InitVal(const BroType* t, Val* aggr) const
|
|||
{
|
||||
RecordVal* rv = v->AsRecordVal();
|
||||
RecordVal* ar = rv->CoerceTo(t->AsRecordType(), aggr);
|
||||
Unref(rv);
|
||||
|
||||
if ( ar )
|
||||
{
|
||||
Unref(rv);
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
Error("bad record initializer");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue