diff --git a/modules/libpr0n/decoders/icon/mac/nsIconChannel.mm b/modules/libpr0n/decoders/icon/mac/nsIconChannel.mm index 02b522bfc512..d02667ffa532 100644 --- a/modules/libpr0n/decoders/icon/mac/nsIconChannel.mm +++ b/modules/libpr0n/decoders/icon/mac/nsIconChannel.mm @@ -259,8 +259,10 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc NS_ENSURE_SUCCESS(rv, rv); CFURLRef macURL; - if (NS_SUCCEEDED(localFileMac->GetCFURL(&macURL))) + if (NS_SUCCEEDED(localFileMac->GetCFURL(&macURL))) { iconImage = [[NSWorkspace sharedWorkspace] iconForFile:[(NSURL*)macURL path]]; + ::CFRelease(macURL); + } } // try by HFS type if we don't have an icon yet