mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 22:18:20 +00:00
Fix runaway reference counting bug in record coercion.
The RecordVal ctor refs the type arg via the MutableVal -> Val ctors, so this line was double incrementing the type's ref count, but could only decrement it once upon the Val's destruction.
This commit is contained in:
parent
b72fbaf99f
commit
7d3b20d4fb
1 changed files with 1 additions and 1 deletions
|
@ -3967,7 +3967,7 @@ RecordCoerceExpr::~RecordCoerceExpr()
|
|||
|
||||
Val* RecordCoerceExpr::Fold(Val* v) const
|
||||
{
|
||||
RecordVal* val = new RecordVal(Type()->Ref()->AsRecordType());
|
||||
RecordVal* val = new RecordVal(Type()->AsRecordType());
|
||||
RecordVal* rv = v->AsRecordVal();
|
||||
|
||||
for ( int i = 0; i < map_size; ++i )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue