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:
Wen Hui
2021-11-08 22:23:31 +02:00
committed by GitHub
parent a1aba4bf75
commit 2ce29e032b
+4 -1
View File
@@ -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;
}