poppler/Annot.cc |    5 ++++-
 poppler/Form.cc  |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 5203aefc41fa47c461812cc46f28281edd226515
Author: Albert Astals Cid <[email protected]>
Date:   Sun Jan 4 14:03:16 2009 +0100

    Plug some memory leaks

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 2510763..7c01d7b 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2006 Scott Turner <[email protected]>
 // Copyright (C) 2007, 2008 Julien Rebetez <[email protected]>
-// Copyright (C) 2007, 2008 Albert Astals Cid <[email protected]>
+// Copyright (C) 2007-2009 Albert Astals Cid <[email protected]>
 // Copyright (C) 2007, 2008 Carlos Garcia Campos <[email protected]>
 // Copyright (C) 2007, 2008 Iñigo Martínez <[email protected]>
 // Copyright (C) 2007 Jeff Muizelaar <[email protected]>
@@ -3057,6 +3057,9 @@ void AnnotWidget::generateFieldAppearance() {
       appRef = obj2.getRef();
     }
 
+    obj2.free();
+    obj1.free();
+
     // this annot doesn't have an AP yet, create one
     if (appRef.num == 0)
       appRef = xref->addIndirectObject(&appearance);
diff --git a/poppler/Form.cc b/poppler/Form.cc
index fb9ab89..dad706e 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -5,7 +5,7 @@
 // This file is licensed under the GPLv2 or later
 //
 // Copyright 2006-2008 Julien Rebetez <[email protected]>
-// Copyright 2007-2008 Albert Astals Cid <[email protected]>
+// Copyright 2007-2009 Albert Astals Cid <[email protected]>
 // Copyright 2007-2008 Carlos Garcia Campos <[email protected]>
 // Copyright 2007 Adrian Johnson <[email protected]>
 // Copyright 2007 Iñigo Martínez <[email protected]>
@@ -258,11 +258,13 @@ void FormWidgetButton::loadDefaults ()
              break;
           }
         } else if (obj2.isStream()) {
+          // TODO do something with str and obj3
           Stream *str = obj2.getStream();
           Dict *tmpDict2 = str->getDict();
           Object obj3;
           tmpDict2->lookup("Length", &obj3);
           onStr = new GooString ("D");
+          obj3.free();
         }
         obj2.free();
        if (onStr)
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to