Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 65853002: Stop leaking a CERTCertificate* during SSL renegotiation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 343bd204eabb85d42782be965e56dde4e0ff09ce..6617dab378068b8ce1778cec285bc8c4eb12e146 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -1283,7 +1283,7 @@ SECStatus SSLClientSocketNSS::Core::OwnAuthCertHandler(
} else {
// Disallow the server certificate to change in a renegotiation.
CERTCertificate* old_cert = core->nss_handshake_state_.server_cert_chain[0];
- CERTCertificate* new_cert = SSL_PeerCertificate(socket);
+ ScopedCERTCertificate new_cert(SSL_PeerCertificate(socket));
if (new_cert->derCert.len != old_cert->derCert.len ||
memcmp(new_cert->derCert.data, old_cert->derCert.data,
new_cert->derCert.len) != 0) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698