Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d04b5211
Commit
d04b5211
authored
Mar 07, 2018
by
Guy Benoish
Committed by
antirez
Mar 14, 2019
Browse files
Fix zlexrangespec mem-leak in genericZrangebylexCommand
parent
516f1c77
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
d04b5211
...
@@ -2907,7 +2907,10 @@ void genericZrangebylexCommand(client *c, int reverse) {
...
@@ -2907,7 +2907,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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment