From 09a99fcd5f6b3dd56a909a3a975024f22a2ce0ea Mon Sep 17 00:00:00 2001 From: Binbin Date: Tue, 18 May 2021 23:33:01 +0800 Subject: In activeDefragStringOb, we have took care defragged so not need to self-incr. (#8952) incrementing the defragged hits counter twice in activeDefragSdsListAndDict --- src/defrag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) -- cgit v1.2.1