summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-05-08 19:03:51 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-05-08 19:03:51 +0000
commitf628e1506e576a8553a9699c1d7f05ef55c24fa2 (patch)
treef54c9f2d1d3a962e95fada46570e1045fa10135f
parent1fce6266564583d356817a21f43c6b1ad8ce3716 (diff)
memleak-- by carlos
-rw-r--r--ChangeLog5
-rw-r--r--poppler/Catalog.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0399d22c..a6f764d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-05-05 Albert Astals Cid <aacid@kde.org>
+ * poppler/Catalog.cc: Fix memleak, patch by
+ Carlos Garcia Campos <carlosgc@gnome.org>
+
+2006-05-05 Albert Astals Cid <aacid@kde.org>
+
* poppler/Function.cc: quick fix for KDE bug #126760
2006-05-04 Albert Astals Cid <aacid@kde.org>
diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index 01d15f60..aacb3086 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -510,6 +510,7 @@ int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry)
GBool NameTree::lookup(UGooString *name, Object *obj)
{
Entry **entry;
+ char *cname;
entry = (Entry **) bsearch(name, entries,
length, sizeof(Entry *), Entry::cmp);
@@ -517,7 +518,9 @@ GBool NameTree::lookup(UGooString *name, Object *obj)
(*entry)->value.fetch(xref, obj);
return gTrue;
} else {
- printf("failed to look up %s\n", name->getCString());
+ cname = name->getCString();
+ printf("failed to look up %s\n", cname);
+ delete[] cname;
obj->initNull();
return gFalse;
}