summaryrefslogtreecommitdiff
path: root/src/defrag.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-05-18 23:33:01 +0800
committerGitHub <noreply@github.com>2021-05-18 18:33:01 +0300
commit09a99fcd5f6b3dd56a909a3a975024f22a2ce0ea (patch)
tree9d0e96de2c9f0e80e071c10d874a86c975411ebe /src/defrag.c
parent25d827d949b2388bbdf459ba1b3ff0cb12ac6af6 (diff)
downloadredis-09a99fcd5f6b3dd56a909a3a975024f22a2ce0ea.tar.gz
In activeDefragStringOb, we have took care defragged so not need to self-incr. (#8952)
incrementing the defragged hits counter twice in activeDefragSdsListAndDict
Diffstat (limited to 'src/defrag.c')
-rw-r--r--src/defrag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/defrag.c b/src/defrag.c
index 3dfb8679c..81528d6c0 100644
--- a/src/defrag.c
+++ b/src/defrag.c
@@ -365,7 +365,7 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) {
} else if (dict_val_type == DEFRAG_SDS_DICT_VAL_IS_STROB) {
robj *newele, *ele = dictGetVal(de);
if ((newele = activeDefragStringOb(ele, &defragged)))
- de->v.val = newele, defragged++;
+ de->v.val = newele;
} else if (dict_val_type == DEFRAG_SDS_DICT_VAL_VOID_PTR) {
void *newptr, *ptr = dictGetVal(de);
if ((newptr = activeDefragAlloc(ptr)))