Skip to content

Commit

Permalink
Don't leak memory if an invalid type is set (#906)
Browse files Browse the repository at this point in the history
Co-authored-by: James Rouzier <jrouzier@inverse.ca>
  • Loading branch information
rouzier and jrouzierinverse authored Aug 19, 2021
1 parent f5f31ff commit 2d9d775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hiredis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2d9d775

Please sign in to comment.