HomePhorge

Fix dangling pointers

Description

Fix dangling pointers

std::vector gives zero guarantees that pointers to its elements remain
valid when the vector's size changes. In particular, pushing new
elements into the vector may trigger reallocation of the underlying heap
area.

Consequently, Event::delegate() needs to ensure that any modifications
to the d->attendees vector are performed before pointers to its elements
are taken and collected.

Found with Valgrind.

Reviewers: mollekopf

Reviewed By: mollekopf

Subscribers: mollekopf

Differential Revision: https://git.kolab.org/D2548

Details

Provenance
sicherhaAuthored on May 25 2021, 8:57 AM
mollekopfCommitted on May 25 2021, 8:58 AM
mollekopfPushed on May 25 2021, 9:02 AM
Reviewer
mollekopf
Differential Revision
D2548: Fix memory bugs
Parents
rLK7a1aef33d2d6: Removed boost dependency
Branches
Unknown
Tags
Unknown
Build Status
Buildable 34243