From d2491c6e2445f672ac97420d8aa03bd235aad825 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 25 Jan 2013 10:22:08 -0600 Subject: Prevent possible leak with texture providers. If the job has been cancelled, ensure we clean up the texture factory that was created. Change-Id: I0a6e4a23732e6041084ddc483d701a25befd91c9 Reviewed-by: Gunnar Sletta --- src/quick/util/qquickpixmapcache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index e43c5e9b71..dda2fbe2b0 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -565,6 +565,8 @@ void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &u mutex.lock(); if (!cancelled.contains(runningJob)) runningJob->postReply(errorCode, errorStr, readSize, t); + else + delete t; mutex.unlock(); } -- cgit v1.2.3