From 1740e2de603c7f7ea6268ffce4dcd498085ff22f Mon Sep 17 00:00:00 2001 From: Jakub Kucharski Date: Sun, 24 Jul 2016 13:14:39 +0200 Subject: [PATCH 2/2] qt5: fix memory leaks in Document::modificationDate() and Document::creationDate() --- qt5/src/poppler-document.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc index 651f510..8d2ef44 100644 --- a/qt5/src/poppler-document.cc +++ b/qt5/src/poppler-document.cc @@ -469,7 +469,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()); } @@ -489,7 +490,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