summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@nokia.com>2010-07-09 09:52:06 (GMT)
committerAndy Shaw <andy.shaw@nokia.com>2010-07-09 09:52:06 (GMT)
commit8079d2951419a983df7b83cfa31f00665c3e76a3 (patch)
treeb4ed06c389bd103ca935b361b68e595acd957d36 /src/corelib
parentd38f4cd66ae6e86923ebc46f6857ee11e11163ba (diff)
downloadQt-8079d2951419a983df7b83cfa31f00665c3e76a3.zip
Qt-8079d2951419a983df7b83cfa31f00665c3e76a3.tar.gz
Qt-8079d2951419a983df7b83cfa31f00665c3e76a3.tar.bz2
Fix a couple of memory leaks due to not releasing CFTypes on Mac
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/corelib')
-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 33e00f6..76a3512 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);
}