[poppler] poppler/PDFDoc.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Jan 8 23:29:13 UTC 2017
poppler/PDFDoc.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit b6c4d6d1312f63e5e6dcfa28ea48ff3e6935daa9
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Jan 9 00:28:37 2017 +0100
Fix memory leak in PDFDoc::markAnnotations
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index f28bdec..f02f192 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh at frogmouth.net>
-// Copyright (C) 2005, 2007-2009, 2011-2016 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005, 2007-2009, 2011-2017 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2008 Julien Rebetez <julienr at svn.gnome.org>
// Copyright (C) 2008, 2010 Pino Toscano <pino at kde.org>
// Copyright (C) 2008, 2010, 2011 Carlos Garcia Campos <carlosgc at gnome.org>
@@ -1735,9 +1735,9 @@ GBool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, Gui
Object obj3;
array->getNF(i, &obj3);
if (obj3.isRef()) {
- Object *newRef = new Object();
- newRef->initRef(newPageNum, 0);
- dict->set("P", newRef);
+ Object newRef;
+ newRef.initRef(newPageNum, 0);
+ dict->set("P", &newRef);
getXRef()->setModifiedObject(&obj1, obj3.getRef());
}
obj3.free();
More information about the poppler
mailing list