Don't leave dangling pointers in AlarmCalendar when removeKAEvents doesn't remove the whole collection
ClosedPublic

Authored by jpalecek on Fri, Aug 9, 1:45 PM.

Details

Summary

AlarmCalendar::removeKAEvents can sometimes delete some, but not all
events from a KAEvent::List stored in mResourceMap. In that case, the
list is left as is, with some pointers invalid. That would later
cause crashes.

This patch only retains valid pointer in the collection.

BUG: 410596

Diff Detail

Repository
R205 KAlarm
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jpalecek created this revision.Fri, Aug 9, 1:45 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptFri, Aug 9, 1:45 PM
jpalecek requested review of this revision.Fri, Aug 9, 1:45 PM
djarvie accepted this revision.Fri, Aug 9, 2:32 PM
This revision is now accepted and ready to land.Fri, Aug 9, 2:32 PM
This revision was automatically updated to reflect the committed changes.