Skip to content

Commit

Permalink
Fix zlexrangespec mem-leak in genericZrangebylexCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
israellot committed May 1, 2019
1 parent fc8cef0 commit c00ee9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/t_zset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2858,7 +2858,10 @@ void genericZrangebylexCommand(client *c, int reverse) {
while (remaining) {
if (remaining >= 3 && !strcasecmp(c->argv[pos]->ptr,"limit")) {
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;
} else {
zslFreeLexRange(&range);
Expand Down

0 comments on commit c00ee9a

Please sign in to comment.