ssl: coverity 1465527 - dereference after null check

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14589)
This commit is contained in:
Pauli 2021-03-17 13:07:56 +10:00
parent 8f586f5bc1
commit 88ce406c89

View File

@ -424,6 +424,9 @@ static int use_certificate_chain_file(SSL_CTX *ctx, SSL *ssl, const char *file)
void *passwd_callback_userdata;
SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx;
if (ctx == NULL && ssl == NULL)
return 0;
ERR_clear_error(); /* clear error stack for
* SSL_CTX_use_certificate() */