bug 395581 release and null out mTransaction when its Init method failed so that we don't try to do anything with this half-initialized object, in particular call Close on it. r+sr=bz a=shaver

This commit is contained in:
cbiesinger@gmail.com 2008-03-12 05:58:06 -07:00
Родитель 3e17156d8d
Коммит 7dfcb87a1c
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -600,7 +600,10 @@ nsHttpChannel::SetupTransaction()
mUploadStream, mUploadStreamHasHeaders,
NS_GetCurrentThread(), callbacks, this,
getter_AddRefs(responseStream));
if (NS_FAILED(rv)) return rv;
if (NS_FAILED(rv)) {
NS_RELEASE(mTransaction);
return rv;
}
rv = nsInputStreamPump::Create(getter_AddRefs(mTransactionPump),
responseStream);