summaryrefslogtreecommitdiffstats
path: root/apps/ciphers.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-11 10:22:36 -0400
committerRich Salz <rsalz@openssl.org>2015-04-11 10:22:36 -0400
commit62adbcee392ba1061bf213174e8c59728e00860e (patch)
treeb0a97dcc7e5d9ff3a60b638e45b254a234b83a41 /apps/ciphers.c
parente2010b202a52be9120582537845f422a60d5d8c0 (diff)
free NULL cleanup 10
Avoid checking for NULL before calling free functions. This gets ssl.*free: ssl_sess_cert_free ssl_free ssl_excert_free ssl_cert_free SSL_free SSL_SRP_CTX_free SSL_SESSION_free SSL_CTX_free SSL_CTX_SRP_CTX_free SSL_CONF_CTX_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/ciphers.c')
-rw-r--r--apps/ciphers.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/ciphers.c b/apps/ciphers.c
index 6c7ff01eea..4b9a114666 100644
--- a/apps/ciphers.c
+++ b/apps/ciphers.c
@@ -223,10 +223,8 @@ int MAIN(int argc, char **argv)
end:
if (use_supported && sk)
sk_SSL_CIPHER_free(sk);
- if (ctx != NULL)
- SSL_CTX_free(ctx);
- if (ssl != NULL)
- SSL_free(ssl);
+ SSL_CTX_free(ctx);
+ SSL_free(ssl);
BIO_free_all(STDout);
apps_shutdown();
OPENSSL_EXIT(ret);