mirror of
https://github.com/fluencelabs/redis
synced 2025-06-26 07:21:35 +00:00
fixed a refcounting bug with SORT ... STORE leading to random crashes
This commit is contained in:
4
redis.c
4
redis.c
@ -4664,7 +4664,9 @@ static void sortCommand(redisClient *c) {
|
||||
}
|
||||
}
|
||||
}
|
||||
dictReplace(c->db->dict,storekey,listObject);
|
||||
if (dictReplace(c->db->dict,storekey,listObject)) {
|
||||
incrRefCount(storekey);
|
||||
}
|
||||
/* Note: we add 1 because the DB is dirty anyway since even if the
|
||||
* SORT result is empty a new key is set and maybe the old content
|
||||
* replaced. */
|
||||
|
Reference in New Issue
Block a user