• sundb's avatar
    Fix crash due to to reuse iterator entry after list deletion in module (#11383) · 6dd21355
    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>
    6dd21355
module.c 519 KB