diff options
author | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 17:56:06 +0000 |
---|---|---|
committer | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 17:56:06 +0000 |
commit | 0d96af054c95e365debb307e3436f1f321db1354 (patch) | |
tree | 8dce6028af95afeacf7c75e9b546d2dd8be5093e /net | |
parent | e10e17c7b9293c9a49c3dde4149b6113501af33f (diff) | |
download | chromium_src-0d96af054c95e365debb307e3436f1f321db1354.zip chromium_src-0d96af054c95e365debb307e3436f1f321db1354.tar.gz chromium_src-0d96af054c95e365debb307e3436f1f321db1354.tar.bz2 |
Reset server_cert_ to NULL after freeing it to prevent
a double free bug.
R=rvargas
Review URL: http://codereview.chromium.org/6806
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/ssl_client_socket_win.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/base/ssl_client_socket_win.cc b/net/base/ssl_client_socket_win.cc index 1eeb090..cd7f7cb 100644 --- a/net/base/ssl_client_socket_win.cc +++ b/net/base/ssl_client_socket_win.cc @@ -183,8 +183,10 @@ void SSLClientSocketWin::Disconnect() { DeleteSecurityContext(&ctxt_); memset(&ctxt_, 0, sizeof(ctxt_)); } - if (server_cert_) + if (server_cert_) { CertFreeCertificateContext(server_cert_); + server_cert_ = NULL; + } // TODO(wtc): reset more members? bytes_decrypted_ = 0; |