Fixed two memory leaks of the status msg (Unicode string) in OnStopBindingProxyEvent

and OnStatusProxyEvent
This commit is contained in:
troy%netscape.com 1998-12-22 18:49:12 +00:00
Родитель f644770762
Коммит be2d0d215b
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

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