diff options
author | Stefano Pironato <stefano.pironato@nokia.com> | 2010-03-29 12:56:27 (GMT) |
---|---|---|
committer | Stefano Pironato <stefano.pironato@nokia.com> | 2010-04-07 07:59:41 (GMT) |
commit | 0102ee1de421a26a8bfd853146e485c3686baef6 (patch) | |
tree | 675631bb9096106d7fea7a98ac435931218b74cd | |
parent | 3f1c42a94d303314d0b63710efcbf4a1566dba7e (diff) | |
download | Qt-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
-rw-r--r-- | src/gui/image/qimagewriter.cpp | 1 |
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; } |