Don't leak memory if an invalid type is set (#906)

Co-authored-by: James Rouzier <jrouzier@inverse.ca>
master
rouzier 2021-08-18 22:13:34 -04:00 committed by GitHub
parent f5f31ff9b9
commit 2d9d77518d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}