Use list_for_each_entry_safe when deleting entries in linked lists.