summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 11:29:44 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 11:29:44 +0000
commite8186ea1a443fd354d6dbd1cc3c45f79ed1deca6 (patch)
tree568064d47cead126b514ee9bae0493a7ffa9294e /shell
parent0b12a8e784b976d6701be7253fd302503fb8aadf (diff)
INTEGRATION: CWS pj83 (1.2.14); FILE MERGED
2007/07/22 13:52:13 pjanik 1.2.14.1: #i79488#: Fix memory leaks.
Diffstat (limited to 'shell')
-rw-r--r--shell/source/backends/macbe/macbelayer.cxx32
1 files changed, 15 insertions, 17 deletions
diff --git a/shell/source/backends/macbe/macbelayer.cxx b/shell/source/backends/macbe/macbelayer.cxx
index 4ff72055edc8..924faafb24b5 100644
--- a/shell/source/backends/macbe/macbelayer.cxx
+++ b/shell/source/backends/macbe/macbelayer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: macbelayer.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ihi $ $Date: 2007-04-16 11:53:33 $
+ * last change: $Author: hr $ $Date: 2007-08-03 12:29:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -118,7 +118,10 @@ Boolean GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *
result = (portNum != NULL) && (CFGetTypeID(portNum) == CFNumberGetTypeID());
}
else
+ {
+ CFRelease(proxyDict);
return false;
+ }
if (result)
result = CFNumberGetValue(portNum, kCFNumberIntType, &portInt);
@@ -138,20 +141,6 @@ Boolean GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *
return result;
}
-/*
- * Get the list of proxy exceptions
- */
-
-CFArrayRef GetExceptionsListSetting()
-{
- CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL);
-
- if (!rProxyDict)
- return false;
- else
- return (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList);
-}
-
} // end private namespace
//------------------------------------------------------------------------------
@@ -205,7 +194,13 @@ void SAL_CALL MacOSXLayer::readData(
{
rtl::OUString aProxyBypassList;
- CFArrayRef rExceptionsList = GetExceptionsListSetting();
+ CFArrayRef rExceptionsList;
+ CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL);
+
+ if (!rProxyDict)
+ rExceptionsList = false;
+ else
+ rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList);
if (rExceptionsList)
{
@@ -220,6 +215,9 @@ void SAL_CALL MacOSXLayer::readData(
}
}
+ if (rProxyDict)
+ CFRelease(rProxyDict);
+
// override default for ProxyType, which is "0" meaning "No proxies".
uno::Sequence<backend::PropertyInfo> aPropInfoList(6);
sal_Int32 nProperties = 1;