diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-11 10:22:36 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-11 10:22:36 -0400 |
commit | 62adbcee392ba1061bf213174e8c59728e00860e (patch) | |
tree | b0a97dcc7e5d9ff3a60b638e45b254a234b83a41 /demos/easy_tls/easy-tls.c | |
parent | e2010b202a52be9120582537845f422a60d5d8c0 (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 'demos/easy_tls/easy-tls.c')
-rw-r--r-- | demos/easy_tls/easy-tls.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/demos/easy_tls/easy-tls.c b/demos/easy_tls/easy-tls.c index 3475551d6a..1a0a03abe6 100644 --- a/demos/easy_tls/easy-tls.c +++ b/demos/easy_tls/easy-tls.c @@ -804,8 +804,7 @@ SSL_CTX *tls_create_ctx(struct tls_create_ctx_args a, void *apparg) err: tls_openssl_errors(err_pref_1, err_pref_2, NULL, apparg); err_return: - if (ret != NULL) - SSL_CTX_free(ret); + SSL_CTX_free(ret); return NULL; } |