diff options
author | David Benjamin <davidben@chromium.org> | 2014-11-03 00:00:28 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-11-06 04:28:30 +0300 |
commit | 3f383908e2ee0268ac48de3f953a2f099614d74f (patch) | |
tree | be73e3d5cc378271367435aa397be0cfdaea1975 /ssl/ssl_cert.c | |
parent | 25cb99c149db172eeda6eda887908664860fe386 (diff) |
Properly clean up on ssl_cert_dup failure.
Caught by scan-build.
Change-Id: I7c09b176d6a9e5d4fcd6e4fba184ac0679983cff
Reviewed-on: https://boringssl-review.googlesource.com/2200
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 33f3fd87..3d56da65 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -361,13 +361,7 @@ CERT *ssl_cert_dup(CERT *cert) return(ret); err: - if (ret->dh_tmp != NULL) - DH_free(ret->dh_tmp); - if (ret->ecdh_tmp != NULL) - EC_KEY_free(ret->ecdh_tmp); - - ssl_cert_clear_certs(ret); - + ssl_cert_free(ret); return NULL; } |