mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Fix table &default reference counting for record ctor expressions.
This commit is contained in:
parent
92d2fdd4a6
commit
54ebe98458
1 changed files with 2 additions and 1 deletions
|
@ -1741,7 +1741,8 @@ Val* TableVal::Default(Val* index)
|
|||
record_promotion_compatible(dtype->AsRecordType(),
|
||||
ytype->AsRecordType()) )
|
||||
{
|
||||
Expr* coerce = new RecordCoerceExpr(def_attr->AttrExpr(), ytype->AsRecordType());
|
||||
Expr* coerce = new RecordCoerceExpr(def_attr->AttrExpr()->Ref(),
|
||||
ytype->AsRecordType());
|
||||
def_val = coerce->Eval(0);
|
||||
Unref(coerce);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue