Unverified Commit 2ce29e03 authored by Wen Hui's avatar Wen Hui Committed by GitHub
Browse files

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.
parent a1aba4bf
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment