summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_unix.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@nokia.com>2010-07-09 11:52:06 +0200
committerAndy Shaw <andy.shaw@nokia.com>2010-07-09 11:52:06 +0200
commit8079d2951419a983df7b83cfa31f00665c3e76a3 (patch)
treeb4ed06c389bd103ca935b361b68e595acd957d36 /src/corelib/io/qfsfileengine_unix.cpp
parentd38f4cd66ae6e86923ebc46f6857ee11e11163ba (diff)
Fix a couple of memory leaks due to not releasing CFTypes on Mac
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/corelib/io/qfsfileengine_unix.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 33e00f6133..76a351291e 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1017,7 +1017,7 @@ QString QFSFileEngine::fileName(FileName file) const
#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
kCFURLPOSIXPathStyle, true);
- if (CFDictionaryRef dict = CFBundleCopyInfoDictionaryForURL(url)) {
+ if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {
if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {
if (CFGetTypeID(name) == CFStringGetTypeID())
return QCFString::toQString((CFStringRef)name);
@@ -1135,7 +1135,7 @@ QString QFSFileEngine::fileName(FileName file) const
if (FSResolveAliasFile(&fref, true, &isFolder, &isAlias) == noErr && isAlias) {
AliasHandle alias;
if (FSNewAlias(0, &fref, &alias) == noErr && alias) {
- CFStringRef cfstr;
+ QCFString cfstr;
if (FSCopyAliasInfo(alias, 0, 0, &cfstr, 0, 0) == noErr)
return QCFString::toQString(cfstr);
}