Fix bug in activeDefragSdsListAndDict dead code (#8403)
In activeDefragSdsListAndDict when dict_val_type is DEFRAG_SDS_DICT_VAL_VOID_PTR, it should update de->v.val not ln->value. Because this code path will never be executed, so this bug never happened.
This commit is contained in:
parent
a32f87de07
commit
379ea8a545
@ -367,7 +367,7 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) {
|
|||||||
} 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)))
|
||||||
ln->value = newptr, defragged++;
|
de->v.val = newptr, defragged++;
|
||||||
}
|
}
|
||||||
defragged += dictIterDefragEntry(di);
|
defragged += dictIterDefragEntry(di);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user