diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-01 02:09:52 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-01 02:09:52 +0000 |
commit | 789f0704460436bf8f47e6aa7063be799a754692 (patch) | |
tree | ee61fa4ee3383e7575166dbc0ac5c3d0285baef6 /net/socket | |
parent | 2e85d76800c77bb3d189ae8e819ee90f9c2373c8 (diff) | |
download | chromium_src-789f0704460436bf8f47e6aa7063be799a754692.zip chromium_src-789f0704460436bf8f47e6aa7063be799a754692.tar.gz chromium_src-789f0704460436bf8f47e6aa7063be799a754692.tar.bz2 |
Fix deleting a CERTCertificate object.
BUG=88782
TEST=none
Review URL: http://codereview.chromium.org/7811010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r-- | net/socket/ssl_client_socket_nss.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index fdac805..617ddc3 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -1568,9 +1568,10 @@ int SSLClientSocketNSS::ImportOBCertAndKey(CERTCertificate** cert, key_usage, key, NULL); if (rv != SECSuccess) { - delete *cert; + int error = MapNSSError(PORT_GetError()); + CERT_DestroyCertificate(*cert); *cert = NULL; - return MapNSSError(PORT_GetError()); + return error; } return OK; |