mirror of https://mirror.osredm.com/root/redis.git
Fix potential crash on failed OpenSSL init (#12447)
This commit is contained in:
parent
b26e8e3213
commit
370d38016f
|
@ -211,6 +211,7 @@ static SSL_CTX *createSSLContext(redisTLSContextConfig *ctx_config, int protocol
|
||||||
SSL_CTX *ctx = NULL;
|
SSL_CTX *ctx = NULL;
|
||||||
|
|
||||||
ctx = SSL_CTX_new(SSLv23_method());
|
ctx = SSL_CTX_new(SSLv23_method());
|
||||||
|
if (!ctx) goto error;
|
||||||
|
|
||||||
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3);
|
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue