summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-07-16 07:34:51 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-07-16 07:35:37 (GMT)
commitbca7646d81d8c580820cf5f6e52122da6d984c6b (patch)
treeeab43947bcf0a1a5bbbacb55d14806de4a89cde7 /src/network/kernel
parentcb9fb8974855a7c36df510d8094b07ef9b08881d (diff)
downloadQt-bca7646d81d8c580820cf5f6e52122da6d984c6b.zip
Qt-bca7646d81d8c580820cf5f6e52122da6d984c6b.tar.gz
Qt-bca7646d81d8c580820cf5f6e52122da6d984c6b.tar.bz2
Network Proxy Query: Fix memleak on OS X
Task-number: QTBUG-12106
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 1e22212..4139a7e 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -157,8 +157,10 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
return result; // failed
}
- if (isHostExcluded(dict, query.peerHostName()))
+ if (isHostExcluded(dict, query.peerHostName())) {
+ CFRelease(dict);
return result; // no proxy for this host
+ }
// is there a PAC enabled? If so, use it first.
CFNumberRef pacEnabled;
@@ -222,6 +224,7 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
result << https;
}
+ CFRelease(dict);
return result;
}