mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
fix for memory leak bug# 21301. MLK: ImageNetContextSyncImpl leaks. r=pnunn
This commit is contained in:
parent
7f18ed1382
commit
de2f1cc41f
@ -393,8 +393,8 @@ NS_IMETHODIMP DeviceContextImpl::LoadIconImage(PRInt32 aId, nsIImage*& aImage)
|
||||
sprintf(url, "resource:/res/gfx/icon_%d.gif", aId);
|
||||
|
||||
// Use a sync net context
|
||||
ilINetContext* netContext;
|
||||
result = NS_NewImageNetContextSync(&netContext);
|
||||
nsCOMPtr<ilINetContext> netContext;
|
||||
result = NS_NewImageNetContextSync(getter_AddRefs(netContext));
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
@ -418,7 +418,6 @@ NS_IMETHODIMP DeviceContextImpl::LoadIconImage(PRInt32 aId, nsIImage*& aImage)
|
||||
mIcons[aId] = imageReq;
|
||||
}
|
||||
|
||||
NS_RELEASE(netContext);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,8 @@ class ilINetReader;
|
||||
class ilINetContext : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IL_INETCONTEXT_IID)
|
||||
|
||||
virtual ilINetContext* Clone()=0;
|
||||
|
||||
virtual NET_ReloadMethod GetReloadPolicy()=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user