Commit 54209751 authored by Albert Astals Cid's avatar Albert Astals Cid

pdf: Fix small memory leak

parent bc85160d
Pipeline #44106 passed with stage
in 39 minutes
...@@ -761,8 +761,8 @@ void PDFGenerator::loadPages(QVector<Okular::Page *> &pagesVector, int rotation, ...@@ -761,8 +761,8 @@ void PDFGenerator::loadPages(QVector<Okular::Page *> &pagesVector, int rotation,
if (count > 0) { if (count > 0) {
#if POPPLER_VERSION_MACRO >= QT_VERSION_CHECK(0, 89, 0) #if POPPLER_VERSION_MACRO >= QT_VERSION_CHECK(0, 89, 0)
const QVector<Poppler::FormFieldSignature *> allSignatures = pdfdoc->signatures(); const QVector<Poppler::FormFieldSignature *> allSignatures = pdfdoc->signatures();
Poppler::Page *page0 = pdfdoc->page(0); std::unique_ptr<Poppler::Page> page0(pdfdoc->page(0));
QLinkedList<Okular::FormField *> page0FormFields = getFormFields(page0); QLinkedList<Okular::FormField *> page0FormFields = getFormFields(page0.get());
for (Poppler::FormFieldSignature *s : allSignatures) { for (Poppler::FormFieldSignature *s : allSignatures) {
bool createSignature = true; bool createSignature = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment