summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/corewlan
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-05-21 17:11:26 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-05-22 14:47:56 +0000
commit79ad3de7bfdb5da56e815993216852a6f3db2809 (patch)
tree17e976142ad75c1468e1fc16d94ebc36d3a1d997 /src/plugins/bearer/corewlan
parent21b5298d15755258bdedd5ab6c38acbd67c41b5f (diff)
QCoreWlanEngine - null the pointer
QCoreWlanEngine is using a global variable but fails to reset it to nil when deleted, thus re-creating this WLAN manager we use a dangling pointer (found in qnetworkconfigurationmanagerqappless). Since our API allows to (re)create object(s) of these class, the pointer must be set to nil after -release call. Ideally, of course, this class has to be re-factored. Change-Id: I08662f55dc6cd2ceb0e0cad2574ee3dee6b8e3fd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins/bearer/corewlan')
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 9530dd83d0..a30d8f69c4 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -85,8 +85,11 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
return self;
}
+static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
+
-(void)dealloc
{
+ listener = nil;
[super dealloc];
}
@@ -117,7 +120,6 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
}
@end
-static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
QT_BEGIN_NAMESPACE