[poppler] poppler/Form.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sun Apr 3 11:41:17 PDT 2011


 poppler/Form.cc |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 813f41367a681702ae7a155d5c2f3195124a9096
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sun Apr 3 20:40:15 2011 +0200

    forms: fix mem leak in case of error

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 7a5860f..1f8b064 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -493,6 +493,8 @@ FormField::FormField(XRef* xrefA, Object *aobj, const Ref& aref, FormField *pare
           // Child is a widget annotation
           if (!terminal && numChildren > 0) {
             error(-1, "Field can't have both Widget AND Field as kids\n");
+            obj2.free();
+            obj3.free();
             continue;
           }
           _createWidget(&childObj, ref);


More information about the poppler mailing list