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:
Jon Siwek 2012-07-24 11:22:51 -05:00
parent 3f4b4c88a6
commit cfa8769a42

View file

@ -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