• sundb's avatar
    Fix crash due to to reuse iterator entry after list deletion in module (#11383) · 9fc20f4f
    sundb authored
    
    
    In the module, we will reuse the list iterator entry for RM_ListDelete, but `listTypeDelete` will only update
    `quicklistEntry->zi` but not `quicklistEntry->node`, which will result in `quicklistEntry->node` pointing to
    a freed memory address if the quicklist node is deleted.
    
    This PR sync `key->u.list.index` and `key->u.list.entry` to list iterator after `RM_ListDelete`.
    
    This PR also optimizes the release code of the original list iterator.
    Co-authored-by: default avatarViktor Söderqvist <viktor@zuiderkwast.se>
    (cherry picked from commit 6dd21355)
    9fc20f4f
list.c 9.16 KB