From: Albert Astals Cid Date: Fri, 3 Jul 2015 09:38:50 +0000 (+0200) Subject: Do not leak the texture factory for cancelled jobs X-Git-Tag: v5.5.90+alpha1~172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72a05626b5420d230d4194b924e0a89246e0d6b5;p=platform%2Fupstream%2Fqtdeclarative.git Do not leak the texture factory for cancelled jobs Change-Id: Ie18e019402857acd17203681d45adaf32be54fcc Reviewed-by: Gunnar Sletta --- diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index f65e54418..6f6e91ec9 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -513,6 +513,8 @@ void QQuickPixmapReader::asyncResponseFinished(QQuickImageResponse *response) mutex.lock(); if (!cancelled.contains(job)) job->postReply(error, errorString, t ? t->textureSize() : QSize(), t); + else + delete t; mutex.unlock(); } response->deleteLater();