[poppler] Branch 'poppler-0.8' - poppler/Annot.cc poppler/ArthurOutputDev.cc poppler/JBIG2Stream.cc

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


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

New commits:
commit 21532d02e52d98dd33c1a5a074933e30a5b50b35
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 889c06d..671af0a 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2095,6 +2095,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;
   }
 
@@ -2448,6 +2451,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 1c0728c..52d5beb 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -736,6 +736,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 5801489..a8b2aab 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