diff options
author | Michael Brasser <michael.brasser@live.com> | 2013-01-25 10:22:08 -0600 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-25 22:31:04 +0100 |
commit | d2491c6e2445f672ac97420d8aa03bd235aad825 (patch) | |
tree | 3f5f940c797fa9900a37a1a74d0ae2f2c3c1ad05 | |
parent | 6933b7e8e6dc279a8eb34e1f4c60bc109dfb7d26 (diff) |
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 <gunnar.sletta@digia.com>
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |