summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorStefano Pironato <stefano.pironato@nokia.com>2010-03-29 12:56:27 (GMT)
committerStefano Pironato <stefano.pironato@nokia.com>2010-04-07 07:59:41 (GMT)
commit0102ee1de421a26a8bfd853146e485c3686baef6 (patch)
tree675631bb9096106d7fea7a98ac435931218b74cd /src/gui/image
parent3f1c42a94d303314d0b63710efcbf4a1566dba7e (diff)
downloadQt-0102ee1de421a26a8bfd853146e485c3686baef6.zip
Qt-0102ee1de421a26a8bfd853146e485c3686baef6.tar.gz
Qt-0102ee1de421a26a8bfd853146e485c3686baef6.tar.bz2
Fix <MemLeak> valgrind report shows memory leak for QImage::save().
Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimagewriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index a5f7b31..503a1b2 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -197,6 +197,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
for (int i = 0; i < keys.size(); ++i) {
QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
if (plugin && (plugin->capabilities(device, testFormat) & QImageIOPlugin::CanWrite)) {
+ delete handler;
handler = plugin->create(device, testFormat);
break;
}