Revision 7e9e071...

Go back to digest for 9th November 2014

Bug Fixes in Multimedia

Matěj Laitl committed changes in [amarok] /:

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.


FIXED-IN: 2.9

File Changes

Modified 2 files
  •   ChangeLog
  •   src/services/scriptable/ScriptableService.cpp
2 files changed in total