summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2014-10-10 09:56:13 -0700
committerDyami Caliri <dyami@dragonframe.com>2015-02-02 21:38:12 +0000
commit2b9949169273efa0c918a168c340aa0d837911fb (patch)
treef42a7d2a23cc0e674dfb083f7b4f00625d9796be /src/corelib/io
parent46d3c25980cac2592c4ad07a927f1f9a4a9e0f53 (diff)
Fix leaks in OS X bundle detection
There were several leaked CFStringRefs in the new OS X bundle detection code that is part of QFileSystemEngine. Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index cd42aff35c..bfa4483ca7 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -83,13 +83,13 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e
if (suffix.length() > 0) {
// First step: is the extension known ?
- CFStringRef extensionRef = QCFString::toCFStringRef(suffix);
- CFStringRef uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
+ QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix);
+ QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle))
return true;
// Second step: check if an application knows the package type
- CFStringRef path = QCFString::toCFStringRef(entry.filePath());
+ QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath());
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true);
UInt32 type, creator;