[poppler] poppler/Dict.cc poppler/PDFDoc.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu Jan 24 10:18:44 PST 2008
poppler/Dict.cc | 2 +-
poppler/PDFDoc.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 7c99ec4635a4971321bbead7d1bc723da59b755e
Author: Julien Rebetez <julien at fhtagn.net>
Date: Thu Jan 24 19:18:15 2008 +0100
Revert unwanted change on Dict, fix leak on writeTrailer
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index be82890..df79cca 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -101,7 +101,7 @@ void Dict::set(char *key, Object *val) {
e = find (key);
if (e) {
e->val.free();
- val->copy(&e->val);
+ e->val = *val;
} else {
add (copyString(key), val);
}
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index d8d2407..936e03b 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -813,16 +813,16 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
obj1.initRef(xref->getRootNum(), xref->getRootGen());
trailerDict->set("Root", &obj1);
- obj1.free();
if (incrUpdate) {
obj1.initInt(xref->getLastXRefPos());
trailerDict->set("Prev", &obj1);
- obj1.free();
}
outStr->printf( "trailer\r\n");
writeDictionnary(trailerDict, outStr);
outStr->printf( "\r\nstartxref\r\n");
outStr->printf( "%i\r\n", uxrefOffset);
outStr->printf( "%%%%EOF\r\n");
+
+ delete trailerDict;
}
More information about the poppler
mailing list