poppler/Annot.cc | 2 +- poppler/StructElement.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 352170ad66fe14c1d1dc9435be7f5770710db9c3 Author: Albert Astals Cid <[email protected]> Date: Mon Nov 1 00:40:56 2021 +0100 Remove check for field being null We're already using it unconditionally a few lines above diff --git a/poppler/Annot.cc b/poppler/Annot.cc index a175aa25..0dfbd731 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -5078,7 +5078,7 @@ void AnnotWidget::generateFieldAppearance() Object resourcesDictObj; const GfxResources *resources = nullptr; GfxResources *resourcesToFree = nullptr; - if (field && field->getObj() && field->getObj()->isDict()) { + if (field->getObj() && field->getObj()->isDict()) { // Let's use a field's resource dictionary. resourcesDictObj = field->getObj()->dictLookup("DR"); if (resourcesDictObj.isDict()) { commit b15bf352a39208876b2e6f28c809290ccdf08eb8 Author: Albert Astals Cid <[email protected]> Date: Mon Nov 1 00:35:21 2021 +0100 StructElement::parseChild: Fix memory leak diff --git a/poppler/StructElement.cc b/poppler/StructElement.cc index e5521177..c44915b4 100644 --- a/poppler/StructElement.cc +++ b/poppler/StructElement.cc @@ -6,7 +6,7 @@ // // Copyright 2013, 2014 Igalia S.L. // Copyright 2014 Luigi Scarso <[email protected]> -// Copyright 2014, 2017-2019 Albert Astals Cid <[email protected]> +// Copyright 2014, 2017-2019, 2021 Albert Astals Cid <[email protected]> // Copyright 2015 Dmytro Morgun <[email protected]> // Copyright 2018, 2021 Adrian Johnson <[email protected]> // Copyright 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. Work sponsored by the LiMux project of the city of Munich @@ -1052,6 +1052,7 @@ StructElement *StructElement::parseChild(const Object *ref, Object *childObj, st child->stmRef = stmObj.copy(); } else if (!stmObj.isNull()) { error(errSyntaxError, -1, "Stm object is wrong type ({0:s})", stmObj.getTypeName()); + delete child; return nullptr; }
