mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
fix memory leak in Cocoa icon decoder. b=342066 r=mento sr=pav
This commit is contained in:
parent
4a103cc93d
commit
2cacb70302
@ -259,8 +259,10 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
CFURLRef macURL;
|
CFURLRef macURL;
|
||||||
if (NS_SUCCEEDED(localFileMac->GetCFURL(&macURL)))
|
if (NS_SUCCEEDED(localFileMac->GetCFURL(&macURL))) {
|
||||||
iconImage = [[NSWorkspace sharedWorkspace] iconForFile:[(NSURL*)macURL path]];
|
iconImage = [[NSWorkspace sharedWorkspace] iconForFile:[(NSURL*)macURL path]];
|
||||||
|
::CFRelease(macURL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// try by HFS type if we don't have an icon yet
|
// try by HFS type if we don't have an icon yet
|
||||||
|
Loading…
Reference in New Issue
Block a user