mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
and another small memory leak when using streaming reads.
This commit is contained in:
parent
f4864c69af
commit
1416d5404d
1 changed files with 2 additions and 2 deletions
|
@ -836,7 +836,6 @@ Val* Manager::ValueToIndexVal(int num_fields, const RecordType *type, const Valu
|
||||||
idxval = ValueToVal(vals[0], type->FieldType(0));
|
idxval = ValueToVal(vals[0], type->FieldType(0));
|
||||||
position = 1;
|
position = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ListVal *l = new ListVal(TYPE_ANY);
|
ListVal *l = new ListVal(TYPE_ANY);
|
||||||
|
@ -1283,7 +1282,6 @@ int Manager::PutTable(Stream* i, const Value* const *vals)
|
||||||
|
|
||||||
else if ( stream->num_val_fields == 1 && stream->want_record == 0 )
|
else if ( stream->num_val_fields == 1 && stream->want_record == 0 )
|
||||||
valval = ValueToVal(vals[position], stream->rtype->FieldType(0));
|
valval = ValueToVal(vals[position], stream->rtype->FieldType(0));
|
||||||
|
|
||||||
else
|
else
|
||||||
valval = ValueToRecordVal(vals, stream->rtype, &position);
|
valval = ValueToRecordVal(vals, stream->rtype, &position);
|
||||||
|
|
||||||
|
@ -1377,6 +1375,8 @@ int Manager::PutTable(Stream* i, const Value* const *vals)
|
||||||
else // no predicates or other stuff
|
else // no predicates or other stuff
|
||||||
stream->tab->Assign(idxval, valval);
|
stream->tab->Assign(idxval, valval);
|
||||||
|
|
||||||
|
Unref(idxval); // not consumed by assign
|
||||||
|
|
||||||
return stream->num_idx_fields + stream->num_val_fields;
|
return stream->num_idx_fields + stream->num_val_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue