mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Fix memory leak in RecordVal JSON formatting
This commit is contained in:
parent
97519e4350
commit
d258ebe5ca
2 changed files with 142 additions and 0 deletions
|
@ -607,6 +607,8 @@ static ZeekJson BuildJSON(Val* val, bool only_loggable=false, RE_Matcher* re=new
|
|||
|
||||
if ( value && ( ! only_loggable || key_field->Lookup("log")->AsBool() ) )
|
||||
j[key_string] = BuildJSON(value, only_loggable, re);
|
||||
|
||||
Unref(value);
|
||||
}
|
||||
|
||||
delete fields;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue