From 18f77ff7945c679dda9e5ed0c5833365c7dcaf78 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 25 Mar 2010 16:14:39 +1000 Subject: Fix crash. Resources are not allocated on error. Only free on success. --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; } -- cgit v0.12