From 2d9d77518d012a54ae34f9822e4b4d19823c4b75 Mon Sep 17 00:00:00 2001 From: rouzier Date: Wed, 18 Aug 2021 22:13:34 -0400 Subject: Don't leak memory if an invalid type is set (#906) Co-authored-by: James Rouzier --- hiredis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiredis.c b/hiredis.c index 9947b1e..7e7af82 100644 --- a/hiredis.c +++ b/hiredis.c @@ -835,7 +835,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) { c->fd = options->endpoint.fd; c->flags |= REDIS_CONNECTED; } else { - // Unknown type - FIXME - FREE + redisFree(c); return NULL; } -- cgit v1.2.3