diff options
Diffstat (limited to 'src/defrag.c')
-rw-r--r-- | src/defrag.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/defrag.c b/src/defrag.c index 2b28d523d..3dfb8679c 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -347,7 +347,9 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) { if ((newsds = activeDefragSds(sdsele))) { /* When defragging an sds value, we need to update the dict key */ uint64_t hash = dictGetHash(d, newsds); - replaceSatelliteDictKeyPtrAndOrDefragDictEntry(d, sdsele, newsds, hash, &defragged); + dictEntry **deref = dictFindEntryRefByPtrAndHash(d, sdsele, hash); + if (deref) + (*deref)->key = newsds; ln->value = newsds; defragged++; } |