summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 00:42:46 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 00:42:46 +0000
commitf9b6a59cc4eccee9f52c250d3c8221cdbe3c0f35 (patch)
tree2a0d830e11d1be7b44322dac3ebfcbbc4e6500a5 /net/socket
parentb7e1492380bd57394cda52931ffd81afa112fd33 (diff)
downloadchromium_src-f9b6a59cc4eccee9f52c250d3c8221cdbe3c0f35.zip
chromium_src-f9b6a59cc4eccee9f52c250d3c8221cdbe3c0f35.tar.gz
chromium_src-f9b6a59cc4eccee9f52c250d3c8221cdbe3c0f35.tar.bz2
Don't initialize NSS before calling SSL_ClearSessionCache.
If NSS is not initialized, conceptually the SSL session cache is empty. So it doesn't make sense to initialize NSS just to clear an empty SSL session cache. Remove the suppression for the leak this CL fixes from suppressions_mac.txt. Widen a related suppression in suppressions.txt to cover this leak. R=mattm@chromium.org,cbentzel@chromium.org BUG=105431,95718 TEST=valgrind bots should not report a leak in SSL_ClearSessionCache. Review URL: http://codereview.chromium.org/8849005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/ssl_client_socket_nss.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index cd40140..835d5ca 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -482,9 +482,8 @@ SSLClientSocketNSS::~SSLClientSocketNSS() {
// static
void SSLClientSocketNSS::ClearSessionCache() {
- // Initialize the NSS SSL library in a threadsafe way. This also
- // initializes the NSS base library.
- EnsureNSSSSLInit();
+ // SSL_ClearSessionCache can't be called before NSS is initialized. Don't
+ // bother initializing NSS just to clear an empty SSL session cache.
if (!NSS_IsInitialized())
return;