Commit 94013b8e authored by Wen Hui's avatar Wen Hui Committed by Oran Agra
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.

(cherry picked from commit 2ce29e03)
parent 968cd2b9
......@@ -2402,7 +2402,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