diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-28 10:54:15 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-28 10:54:15 -0400 |
commit | c5ba2d990420e1778ca4a90bf882e0f806404af0 (patch) | |
tree | 61641d19bea624b7fa523162f0ebb0d5e2fccf55 /ssl | |
parent | 33b188a8e82df57208ec8263c263f8b6f47e8255 (diff) |
free NULL cleanup
EVP_.*free; this gets:
EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free
EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it
EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_srvr.c | 3 | ||||
-rw-r--r-- | ssl/ssl_cert.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 68a8c812e0..5b17e52450 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -2869,8 +2869,7 @@ int ssl3_get_client_key_exchange(SSL *s) EVP_PKEY_CTX_free(pkey_ctx); if (ret) return ret; - else - goto err; + goto err; } else { al = SSL_AD_HANDSHAKE_FAILURE; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, SSL_R_UNKNOWN_CIPHER_TYPE); diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index f05a60a30a..d6401b43d2 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -402,10 +402,8 @@ void ssl_cert_clear_certs(CERT *c) X509_free(cpk->x509); cpk->x509 = NULL; } - if (cpk->privatekey) { - EVP_PKEY_free(cpk->privatekey); - cpk->privatekey = NULL; - } + EVP_PKEY_free(cpk->privatekey); + cpk->privatekey = NULL; if (cpk->chain) { sk_X509_pop_free(cpk->chain, X509_free); cpk->chain = NULL; |