From f9b6a59cc4eccee9f52c250d3c8221cdbe3c0f35 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Fri, 9 Dec 2011 00:42:46 +0000 Subject: 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 --- net/socket/ssl_client_socket_nss.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'net/socket') 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; -- cgit v1.1