Don't leak memory if an invalid type is set (#906)
Co-authored-by: James Rouzier <jrouzier@inverse.ca>master
parent
f5f31ff9b9
commit
2d9d77518d
|
@ -835,7 +835,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
|
||||||
c->fd = options->endpoint.fd;
|
c->fd = options->endpoint.fd;
|
||||||
c->flags |= REDIS_CONNECTED;
|
c->flags |= REDIS_CONNECTED;
|
||||||
} else {
|
} else {
|
||||||
// Unknown type - FIXME - FREE
|
redisFree(c);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue