summaryrefslogtreecommitdiff
path: root/ssl.c
diff options
context:
space:
mode:
authorsundb <sundbcn@gmail.com>2021-12-16 17:42:58 +0800
committerGitHub <noreply@github.com>2021-12-16 17:42:58 +0800
commitc6657ef65bacc989a5ae1462062d41547fa84765 (patch)
tree859dfe063b7755339425c9ebbab3bdc55b4bf95f /ssl.c
parentfd033e983acb69f7814255e7836f255411e17007 (diff)
parentda5a4ff3622e8744b772a76f6ce580dc9134fb38 (diff)
Merge branch 'redis:master' into master
Diffstat (limited to 'ssl.c')
-rw-r--r--ssl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ssl.c b/ssl.c
index c856bbc..c581f63 100644
--- a/ssl.c
+++ b/ssl.c
@@ -351,7 +351,6 @@ static int redisSSLConnect(redisContext *c, SSL *ssl) {
}
hi_free(rssl);
- SSL_free(ssl);
return REDIS_ERR;
}
@@ -393,7 +392,11 @@ int redisInitiateSSLWithContext(redisContext *c, redisSSLContext *redis_ssl_ctx)
}
}
- return redisSSLConnect(c, ssl);
+ if (redisSSLConnect(c, ssl) != REDIS_OK) {
+ goto error;
+ }
+
+ return REDIS_OK;
error:
if (ssl)