Bug 647551 - Uninitialized variable rv in imgLoader::LoadImageWithChannel; r=joedrew

This commit is contained in:
Ms2ger 2011-04-07 21:55:25 -07:00
parent 1528a3aa42
commit 0db0025d08

View File

@ -1,6 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** BEGIN LICENSE BLOCK *****
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
@ -1731,7 +1730,6 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
{
NS_ASSERTION(channel, "imgLoader::LoadImageWithChannel -- NULL channel pointer");
nsresult rv;
nsRefPtr<imgRequest> request;
nsCOMPtr<nsIURI> uri;
@ -1801,6 +1799,7 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
// XXX: It looks like the wrong load flags are being passed in...
requestFlags &= 0xFFFF;
nsresult rv = NS_OK;
if (request) {
// we have this in our cache already.. cancel the current (document) load
@ -1821,11 +1820,6 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
request->Init(originalURI, uri, channel, channel, entry, NS_GetCurrentThread(), aCX);
ProxyListener *pl = new ProxyListener(static_cast<nsIStreamListener *>(request.get()));
if (!pl) {
request->CancelAndAbort(NS_ERROR_OUT_OF_MEMORY);
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(pl);
*listener = static_cast<nsIStreamListener*>(pl);