Fixed two memory leaks of the status msg (Unicode string) in OnStopBindingProxyEvent
and OnStatusProxyEvent git-svn-id: svn://10.0.0.236/trunk@16812 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -538,9 +538,10 @@ OnStatusProxyEvent::OnStatusProxyEvent(nsStreamListenerProxy* aProxy,
|
||||
NS_IMETHODIMP
|
||||
OnStatusProxyEvent::HandleEvent()
|
||||
{
|
||||
return mProxy->mRealListener->OnStatus(mURL, mMsg);
|
||||
delete mMsg;
|
||||
nsresult rv = mProxy->mRealListener->OnStatus(mURL, mMsg);
|
||||
delete []mMsg;
|
||||
mMsg = nsnull;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -569,9 +570,10 @@ OnStopBindingProxyEvent::OnStopBindingProxyEvent(nsStreamListenerProxy* aProxy,
|
||||
NS_IMETHODIMP
|
||||
OnStopBindingProxyEvent::HandleEvent()
|
||||
{
|
||||
return mProxy->mRealListener->OnStopBinding(mURL, mStatus, mMsg);
|
||||
delete mMsg;
|
||||
nsresult rv = mProxy->mRealListener->OnStopBinding(mURL, mStatus, mMsg);
|
||||
delete []mMsg;
|
||||
mMsg = nsnull;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user