summaryrefslogtreecommitdiff
path: root/poppler/Catalog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/Catalog.cc')
-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;
}