Fix a leak when the directory listing is pulled from the cache (bug 199425). r=bbaetz, sr=darin.

This commit is contained in:
bryner%netscape.com 2003-04-02 03:17:30 +00:00
Родитель a855c02802
Коммит 1ed5a8b575
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -587,8 +587,10 @@ nsFTPChannel::OnStatus(nsIRequest *request, nsISupports *aContext,
// The state machine needs to know that the data connection
// was successfully started so that it can issue data commands
// securely.
NS_ASSERTION(mFTPState, "ftp state is null.");
if (mFTPState)
(void) mFTPState->DataConnectionEstablished();
else
NS_ERROR("ftp state is null.");
}
if (!mEventSink || (mLoadFlags & LOAD_BACKGROUND) || !mIsPending)
@ -647,6 +649,7 @@ nsFTPChannel::OnStopRequest(nsIRequest *request, nsISupports* aContext,
if (mUploadStream)
mUploadStream->Close();
NS_IF_RELEASE(mFTPState);
mIsPending = PR_FALSE;
return rv;
}