poppler/PDFDoc.cc |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b6c4d6d1312f63e5e6dcfa28ea48ff3e6935daa9
Author: Albert Astals Cid <[email protected]>
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 <[email protected]>
-// Copyright (C) 2005, 2007-2009, 2011-2016 Albert Astals Cid <[email protected]>
+// Copyright (C) 2005, 2007-2009, 2011-2017 Albert Astals Cid <[email protected]>
 // Copyright (C) 2008 Julien Rebetez <[email protected]>
 // Copyright (C) 2008, 2010 Pino Toscano <[email protected]>
 // Copyright (C) 2008, 2010, 2011 Carlos Garcia Campos <[email protected]>
@@ -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();
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to