mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-24 00:59:02 -05:00
Fix zlexrangespec mem-leak in genericZrangebylexCommand
This commit is contained in:
parent
3a5bf75ede
commit
b660fc2fbe
@ -2856,7 +2856,10 @@ void genericZrangebylexCommand(client *c, int reverse) {
|
|||||||
while (remaining) {
|
while (remaining) {
|
||||||
if (remaining >= 3 && !strcasecmp(c->argv[pos]->ptr,"limit")) {
|
if (remaining >= 3 && !strcasecmp(c->argv[pos]->ptr,"limit")) {
|
||||||
if ((getLongFromObjectOrReply(c, c->argv[pos+1], &offset, NULL) != C_OK) ||
|
if ((getLongFromObjectOrReply(c, c->argv[pos+1], &offset, NULL) != C_OK) ||
|
||||||
(getLongFromObjectOrReply(c, c->argv[pos+2], &limit, NULL) != C_OK)) return;
|
(getLongFromObjectOrReply(c, c->argv[pos+2], &limit, NULL) != C_OK)) {
|
||||||
|
zslFreeLexRange(&range);
|
||||||
|
return;
|
||||||
|
}
|
||||||
pos += 3; remaining -= 3;
|
pos += 3; remaining -= 3;
|
||||||
} else {
|
} else {
|
||||||
zslFreeLexRange(&range);
|
zslFreeLexRange(&range);
|
||||||
|
Loading…
Reference in New Issue
Block a user