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
d3cd2e9a
Unverified
Commit
d3cd2e9a
authored
Mar 14, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Mar 14, 2019
Browse files
Merge pull request #4742 from guybe7/zrangebylex_leak
Fix zlexrangespec mem-leak in genericZrangebylexCommand
parents
ec03f2db
b660fc2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
d3cd2e9a
...
...
@@ -2906,7 +2906,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
);
...
...
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