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
parent 3e17156d8d
commit 7dfcb87a1c

View File

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