summaryrefslogtreecommitdiff
path: root/ssl.c
diff options
context:
space:
mode:
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)