mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 647551 - Uninitialized variable rv in imgLoader::LoadImageWithChannel; r=joedrew
This commit is contained in:
parent
1528a3aa42
commit
0db0025d08
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user