- 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
This commit is contained in:
parent
0b0a4fc8fa
commit
64a2b7bd9a
@ -342,7 +342,7 @@ void Phase::stopCustomAnimation(AnimId id)
|
|||||||
{
|
{
|
||||||
QMap<AnimId, CustomAnimationState*>::iterator it = d->customAnims.find(id);
|
QMap<AnimId, CustomAnimationState*>::iterator it = d->customAnims.find(id);
|
||||||
if (it != d->customAnims.end()) {
|
if (it != d->customAnims.end()) {
|
||||||
delete it.value()->slot;
|
delete [] it.value()->slot;
|
||||||
delete it.value();
|
delete it.value();
|
||||||
d->customAnims.erase(it);
|
d->customAnims.erase(it);
|
||||||
}
|
}
|
||||||
@ -540,7 +540,7 @@ void Phase::timerEvent(QTimerEvent *event)
|
|||||||
} else {
|
} else {
|
||||||
QMetaObject::invokeMethod(state->receiver, state->slot, Q_ARG(qreal, 1));
|
QMetaObject::invokeMethod(state->receiver, state->slot, Q_ARG(qreal, 1));
|
||||||
d->customAnims.erase(d->customAnims.find(state->id));
|
d->customAnims.erase(d->customAnims.find(state->id));
|
||||||
delete state->slot;
|
delete [] state->slot;
|
||||||
delete state;
|
delete state;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user