mirror of
https://github.com/fluencelabs/redis
synced 2025-06-16 18:51:20 +00:00
Fixed a bug in HSET, a memory leak, and a theoretical bug in dict.c
This commit is contained in:
2
redis.c
2
redis.c
@ -5849,7 +5849,7 @@ static void hsetCommand(redisClient *c) {
|
||||
tryObjectEncoding(c->argv[2]);
|
||||
/* note that c->argv[3] is already encoded, as the latest arg
|
||||
* of a bulk command is always integer encoded if possible. */
|
||||
if (dictAdd(o->ptr,c->argv[2],c->argv[3]) == DICT_OK) {
|
||||
if (dictReplace(o->ptr,c->argv[2],c->argv[3])) {
|
||||
incrRefCount(c->argv[2]);
|
||||
} else {
|
||||
update = 1;
|
||||
|
Reference in New Issue
Block a user