mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Fix memory leak when processing a thread's input message fails.
The message is reclaimed in both success/fail cases now.
This commit is contained in:
parent
3f4b4c88a6
commit
cfa8769a42
1 changed files with 2 additions and 2 deletions
|
@ -342,14 +342,14 @@ void MsgThread::Run()
|
|||
|
||||
bool result = msg->Process();
|
||||
|
||||
delete msg;
|
||||
|
||||
if ( ! result )
|
||||
{
|
||||
string s = Fmt("%s failed, terminating thread (MsgThread)", Name());
|
||||
Error(s.c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
delete msg;
|
||||
}
|
||||
|
||||
// In case we haven't send the finish method yet, do it now. Reading
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue