summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-07-16 07:34:51 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-07-17 10:36:39 (GMT)
commit0b5cfac41f7bb0911e45706b1fbdb3f11c1ee309 (patch)
tree99c8ffc039674a3f7aae98376f8dd07c57f00b4f /src
parentaa77bf059eb7dfe41c9958f356fd80eac04b2f64 (diff)
downloadQt-0b5cfac41f7bb0911e45706b1fbdb3f11c1ee309.zip
Qt-0b5cfac41f7bb0911e45706b1fbdb3f11c1ee309.tar.gz
Qt-0b5cfac41f7bb0911e45706b1fbdb3f11c1ee309.tar.bz2
Network Proxy Query: Fix memleak on OS X
Task-number: QTBUG-12106 (cherry picked from commit bca7646d81d8c580820cf5f6e52122da6d984c6b)
Diffstat (limited to 'src')
-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;
}