scriptable service: fix a crash due to double deletion of an object
Thanks go to Ralf Engels for pointing out the problematic code. The problem is IMO not directly in insertItem() using KSharedPtr, but in addTrack() which creates a KSharedPtr out of a track pointer, but at the same time calls delete on the track pointer in some circumstances. Once a pointer is KSharedPtr-managed, delete must not be used. I've kept KSharedPtr for track in insertItem(). While using it is a bit inconsistent wrt. surrounding code, it should have no effect (the crash is IMO caused by addTrack() code alone). It feels more correct as it prevents a hypothetical (currently unreachable) memory leak. Interested folks, please test whether this really fixes bug 334479 for you. BUG: 334479 FIXED-IN: 2.9
parent
a383acb9
Please register or sign in to comment