diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 06:14:39 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 06:14:39 (GMT) |
commit | 18f77ff7945c679dda9e5ed0c5833365c7dcaf78 (patch) | |
tree | 3a478eca0823677882fc32df12311a41525a08d7 /src/plugins/bearer | |
parent | 3ccbfc46ef2647421608522aa38c12958e4ea3c3 (diff) | |
download | Qt-18f77ff7945c679dda9e5ed0c5833365c7dcaf78.zip Qt-18f77ff7945c679dda9e5ed0c5833365c7dcaf78.tar.gz Qt-18f77ff7945c679dda9e5ed0c5833365c7dcaf78.tar.bz2 |
Fix crash.
Resources are not allocated on error. Only free on success.
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r-- | src/plugins/bearer/corewlan/qcorewlanengine.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index e565307..0e9e4bd 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -295,10 +295,10 @@ void QCoreWlanEngine::connectToId(const QString &id) password = [NSString stringWithUTF8String:pBuf]; } + SecKeychainItemFreeContent(&listW, realPassword); } CFRelease(searchItem); - SecKeychainItemFreeContent(&listW, realPassword); } else { qDebug() << "SecKeychainSearchCopyNext error"; } |