mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Fixed a SORT memory leak that should never happen in practice
This commit is contained in:
parent
28173a49a7
commit
ed5a857a6d
5
redis.c
5
redis.c
@ -4598,7 +4598,10 @@ static robj *lookupKeyByPattern(redisDb *db, robj *pattern, robj *subst) {
|
||||
ssub = subst->ptr;
|
||||
if (sdslen(spat)+sdslen(ssub)-1 > REDIS_SORTKEY_MAX) return NULL;
|
||||
p = strchr(spat,'*');
|
||||
if (!p) return NULL;
|
||||
if (!p) {
|
||||
decrRefCount(subst);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
prefixlen = p-spat;
|
||||
sublen = sdslen(ssub);
|
||||
|
Loading…
x
Reference in New Issue
Block a user