From 64a2b7bd9a1555b7504397dbb1c8313675e9eb94 Mon Sep 17 00:00:00 2001 From: Frerich Raabe Date: Thu, 22 Nov 2007 20:30:24 +0000 Subject: [PATCH] - Don't leak memory; the "slot" string is allocated with qstrdup() with uses new[] internally. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=740217 --- phase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phase.cpp b/phase.cpp index 6dd34d1b1..fba273867 100644 --- a/phase.cpp +++ b/phase.cpp @@ -342,7 +342,7 @@ void Phase::stopCustomAnimation(AnimId id) { QMap::iterator it = d->customAnims.find(id); if (it != d->customAnims.end()) { - delete it.value()->slot; + delete [] it.value()->slot; delete it.value(); d->customAnims.erase(it); } @@ -540,7 +540,7 @@ void Phase::timerEvent(QTimerEvent *event) } else { QMetaObject::invokeMethod(state->receiver, state->slot, Q_ARG(qreal, 1)); d->customAnims.erase(d->customAnims.find(state->id)); - delete state->slot; + delete [] state->slot; delete state; } } else {