mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix memory leak in some reporter messaging cases.
Related to the changes in fdd11428
.
This commit is contained in:
parent
ed165f22a2
commit
b72fbaf99f
1 changed files with 8 additions and 6 deletions
|
@ -320,6 +320,14 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
|||
else
|
||||
mgr.QueueEvent(event, vl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( addl )
|
||||
{
|
||||
loop_over_list(*addl, i)
|
||||
Unref((*addl)[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if ( out )
|
||||
{
|
||||
|
@ -351,12 +359,6 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
|||
|
||||
if ( out )
|
||||
fprintf(out, "%s", s.c_str());
|
||||
|
||||
if ( addl )
|
||||
{
|
||||
loop_over_list(*addl, i)
|
||||
Unref((*addl)[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if ( alloced )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue