Sentinel tls memory leak (#9753)
There was a memory leak when tls is used in Sentinels. The memory leak is noticed when some of the replicas are offline.
This commit is contained in:
parent
a1aba4bf75
commit
2ce29e032b
@ -2348,7 +2348,10 @@ static int instanceLinkNegotiateTLS(redisAsyncContext *context) {
|
||||
SSL *ssl = SSL_new(redis_tls_client_ctx ? redis_tls_client_ctx : redis_tls_ctx);
|
||||
if (!ssl) return C_ERR;
|
||||
|
||||
if (redisInitiateSSL(&context->c, ssl) == REDIS_ERR) return C_ERR;
|
||||
if (redisInitiateSSL(&context->c, ssl) == REDIS_ERR) {
|
||||
SSL_free(ssl);
|
||||
return C_ERR;
|
||||
}
|
||||
#endif
|
||||
return C_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user