Qt docs for qstrdup() say:

"Ownership is passed to the caller, so the returned string must be deleted using delete[]"

Thanks go to valgrind for helping to find this nasty crash! :)

svn path=/trunk/KDE/kdelibs/; revision=881260
This commit is contained in:
Dmitry Suzdalev 2008-11-07 16:09:52 +00:00
parent fe7c3dc17b
commit 4de7d13a16

View File

@ -255,7 +255,7 @@ void AnimatorPrivate::customAnimReceiverDestroyed(QObject *o)
QMutableMapIterator<int, CustomAnimationState*> it(customAnims);
while (it.hasNext()) {
if (it.next().value()->receiver == o) {
delete it.value()->slot;
delete[] it.value()->slot;
delete it.value();
it.remove();
}