Unverified Commit 09a99fcd authored by Binbin's avatar Binbin Committed by GitHub
Browse files

In activeDefragStringOb, we have took care defragged so not need to self-incr. (#8952)

incrementing the defragged hits counter twice in activeDefragSdsListAndDict
parent 25d827d9
...@@ -365,7 +365,7 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) { ...@@ -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) { } else if (dict_val_type == DEFRAG_SDS_DICT_VAL_IS_STROB) {
robj *newele, *ele = dictGetVal(de); robj *newele, *ele = dictGetVal(de);
if ((newele = activeDefragStringOb(ele, &defragged))) 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) { } else if (dict_val_type == DEFRAG_SDS_DICT_VAL_VOID_PTR) {
void *newptr, *ptr = dictGetVal(de); void *newptr, *ptr = dictGetVal(de);
if ((newptr = activeDefragAlloc(ptr))) if ((newptr = activeDefragAlloc(ptr)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment