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

Authored by jpalecek on Aug 9 2019, 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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14904
Build 14922: arc lint + arc unit
jpalecek created this revision.Aug 9 2019, 1:45 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptAug 9 2019, 1:45 PM
jpalecek requested review of this revision.Aug 9 2019, 1:45 PM
djarvie accepted this revision.Aug 9 2019, 2:32 PM
This revision is now accepted and ready to land.Aug 9 2019, 2:32 PM
This revision was automatically updated to reflect the committed changes.