summaryrefslogtreecommitdiff
path: root/poppler
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 /poppler
parent1fce6266564583d356817a21f43c6b1ad8ce3716 (diff)
memleak-- by carlos
Diffstat (limited to 'poppler')
-rw-r--r--poppler/Catalog.cc5
1 files changed, 4 insertions, 1 deletions
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;
}