From 1ee2f09da077ca46fec6c70c7f17c0b4c6087d20 Mon Sep 17 00:00:00 2001 From: Jakub Kucharski Date: Sun, 24 Jul 2016 13:14:19 +0200 Subject: [PATCH 1/2] qt4: fix memory leaks in Document::modificationDate() and Document::creationDate() --- qt4/src/poppler-document.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc index 2893625..93f9a0a 100644 --- a/qt4/src/poppler-document.cc +++ b/qt4/src/poppler-document.cc @@ -483,7 +483,8 @@ namespace Poppler { return QDateTime(); } - QString str = UnicodeParsedString(m_doc->doc->getDocInfoCreatDate()); + QScopedPointer goo(m_doc->doc->getDocInfoCreatDate()); + QString str = UnicodeParsedString(goo.data()); return Poppler::convertDate(str.toLatin1().data()); } @@ -503,7 +504,8 @@ namespace Poppler { return QDateTime(); } - QString str = UnicodeParsedString(m_doc->doc->getDocInfoModDate()); + QScopedPointer goo(m_doc->doc->getDocInfoModDate()); + QString str = UnicodeParsedString(goo.data()); return Poppler::convertDate(str.toLatin1().data()); } -- 2.9.0