diff options
author | Huang Zw <huang_zhw@126.com> | 2021-01-28 00:56:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 18:56:43 +0200 |
commit | f395119eded8294e80918331ebc4948eb5e5e006 (patch) | |
tree | 104b3d1a6b0fd86a0a1bd7c47f094bc7af433066 /src/defrag.c | |
parent | ad7d4c6b709ce94ed9a2fa3a1fcf9b8cf7843eff (diff) | |
download | redis-f395119eded8294e80918331ebc4948eb5e5e006.tar.gz |
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.
Diffstat (limited to 'src/defrag.c')
-rw-r--r-- | src/defrag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/defrag.c b/src/defrag.c index e189deddd..db797711e 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -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) { void *newptr, *ptr = dictGetVal(de); if ((newptr = activeDefragAlloc(ptr))) - ln->value = newptr, defragged++; + de->v.val = newptr, defragged++; } defragged += dictIterDefragEntry(di); } |