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
ed5a857a
Commit
ed5a857a
authored
Nov 21, 2009
by
antirez
Browse files
Fixed a SORT memory leak that should never happen in practice
parent
28173a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
ed5a857a
...
@@ -4598,7 +4598,10 @@ static robj *lookupKeyByPattern(redisDb *db, robj *pattern, robj *subst) {
...
@@ -4598,7 +4598,10 @@ static robj *lookupKeyByPattern(redisDb *db, robj *pattern, robj *subst) {
ssub = subst->ptr;
ssub = subst->ptr;
if (sdslen(spat)+sdslen(ssub)-1 > REDIS_SORTKEY_MAX) return NULL;
if (sdslen(spat)+sdslen(ssub)-1 > REDIS_SORTKEY_MAX) return NULL;
p = strchr(spat,'*');
p = strchr(spat,'*');
if (!p) return NULL;
if (!p) {
decrRefCount(subst);
return NULL;
}
prefixlen = p-spat;
prefixlen = p-spat;
sublen = sdslen(ssub);
sublen = sdslen(ssub);
...
...
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