[poppler] poppler/Annot.cc poppler/ArthurOutputDev.cc poppler/JBIG2Stream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun May 4 06:27:53 PDT 2008


 poppler/Annot.cc           |    6 ++++++
 poppler/ArthurOutputDev.cc |    1 +
 poppler/JBIG2Stream.cc     |    1 +
 3 files changed, 8 insertions(+)

New commits:
commit 546a7b700862db00240de9fd50bdba1dd347765b
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun May 4 15:26:26 2008 +0200

    Fix leaks on error conditions

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 11c91fa..c1ea2e0 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2176,6 +2176,9 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxFontDict *fontDict
     error(-1, "Missing 'Tf' operator in field's DA string");
   }
   if (!font) {
+    if (daToks) {
+      deleteGooList(daToks, GooString);
+    }
     return;
   }
 
@@ -2529,6 +2532,9 @@ void AnnotWidget::drawListBox(GooString **text, GBool *selection,
     error(-1, "Missing 'Tf' operator in field's DA string");
   }
   if (!font) {
+    if (daToks) {
+      deleteGooList(daToks, GooString);
+    }
     return;
   }
 
diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index 9c42300..16c17d9 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -784,6 +784,7 @@ void ArthurOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
 
   if (m_image == NULL || m_image->isNull()) {
     qDebug() << "Null image";
+    delete imgStr;
     return;
   }
   ctm = state->getCTM();
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index b696adb..1328d40 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -1527,6 +1527,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
         codeTables->append(seg);
       }
     } else {
+      delete codeTables;
       return gFalse;
     }
   }


More information about the poppler mailing list