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:
@@ -393,8 +393,7 @@ SSL *SSL_new(SSL_CTX *ctx)
|
||||
|
||||
return (s);
|
||||
err:
|
||||
if (s != NULL)
|
||||
SSL_free(s);
|
||||
SSL_free(s);
|
||||
SSLerr(SSL_F_SSL_NEW, ERR_R_MALLOC_FAILURE);
|
||||
return (NULL);
|
||||
}
|
||||
@@ -2992,6 +2991,7 @@ int ssl_init_wbio_buffer(SSL *s, int push)
|
||||
|
||||
void ssl_free_wbio_buffer(SSL *s)
|
||||
{
|
||||
/* callers ensure s is never null */
|
||||
if (s->bbio == NULL)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user