summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrouzier <rouzier@gmail.com>2021-08-18 22:13:34 -0400
committerGitHub <noreply@github.com>2021-08-18 19:13:34 -0700
commit2d9d77518d012a54ae34f9822e4b4d19823c4b75 (patch)
tree12d93b6486ff5957680cbb04bd7714bd651a8493
parentf5f31ff9b92b6bdf628716449d0d0782ceb7704a (diff)
Don't leak memory if an invalid type is set (#906)
Co-authored-by: James Rouzier <jrouzier@inverse.ca>
-rw-r--r--hiredis.c2
1 files changed, 1 insertions, 1 deletions
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;
}