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>
This commit is contained in:
@@ -2024,8 +2024,7 @@ int MAIN(int argc, char **argv)
|
||||
if (next_proto.data)
|
||||
OPENSSL_free(next_proto.data);
|
||||
#endif
|
||||
if (ctx != NULL)
|
||||
SSL_CTX_free(ctx);
|
||||
SSL_CTX_free(ctx);
|
||||
if (cert)
|
||||
X509_free(cert);
|
||||
if (crls)
|
||||
@@ -2040,8 +2039,7 @@ int MAIN(int argc, char **argv)
|
||||
ssl_excert_free(exc);
|
||||
if (ssl_args)
|
||||
sk_OPENSSL_STRING_free(ssl_args);
|
||||
if (cctx)
|
||||
SSL_CONF_CTX_free(cctx);
|
||||
SSL_CONF_CTX_free(cctx);
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
if (jpake_secret && psk_key)
|
||||
OPENSSL_free(psk_key);
|
||||
|
||||
Reference in New Issue
Block a user