mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
fix memory leak in input framework.
If the input framework was used to read event streams and those streams contained records with more than one field, not all elements of the threading Values were cleaned up. The reason for this is, that the SendEventStreamEvent function returned the number of record elements in the outmost record instead of the number of unrolled elements in the whole vector. This number is later used to determine how many objects to delete. Also - add a whole bunch of leak checks for the input framework that would have caught that and should cover quite a number of use-cases.
This commit is contained in:
parent
574018f478
commit
504d22b91b
7 changed files with 529 additions and 1 deletions
|
@ -1468,7 +1468,7 @@ int Manager::SendEventStreamEvent(Stream* i, EnumVal* type, const Value* const *
|
|||
|
||||
SendEvent(stream->event, out_vals);
|
||||
|
||||
return stream->fields->NumFields();
|
||||
return stream->num_fields;
|
||||
}
|
||||
|
||||
int Manager::PutTable(Stream* i, const Value* const *vals)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue