[poppler] utils/pdfinfo.cc utils/pdftoabw.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Apr 6 14:48:56 PDT 2010
utils/pdfinfo.cc | 2 +-
utils/pdftoabw.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 425a62b5fa8e4e69bfc1c64ed126b5baac06d78a
Author: Hib Eris <hib at hiberis.nl>
Date: Tue Apr 6 10:57:30 2010 +0200
pdfutils: fix deleting fileName
diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc
index c645816..2abe8b4 100644
--- a/utils/pdfinfo.cc
+++ b/utils/pdfinfo.cc
@@ -166,7 +166,6 @@ int main(int argc, char *argv[]) {
}
doc = PDFDocFactory().createPDFDoc(*fileName, ownerPW, userPW);
- delete fileName;
if (userPW) {
delete userPW;
@@ -320,6 +319,7 @@ int main(int argc, char *argv[]) {
err2:
uMap->decRefCnt();
delete doc;
+ delete fileName;
err1:
delete globalParams;
err0:
diff --git a/utils/pdftoabw.cc b/utils/pdftoabw.cc
index 2f7f042..5a53281 100644
--- a/utils/pdftoabw.cc
+++ b/utils/pdftoabw.cc
@@ -144,7 +144,6 @@ int main(int argc, char *argv[]) {
}
doc = PDFDocFactory().createPDFDoc(*fileName, ownerPW, userPW);
- delete fileName;
if (userPW) {
delete userPW;
@@ -190,6 +189,7 @@ int main(int argc, char *argv[]) {
// clean up
if(globalParams) delete globalParams;
if(doc) delete doc;
+ delete fileName;
if(XMLdoc) xmlFreeDoc(XMLdoc);
if(abwOut) delete abwOut;
err0:
More information about the poppler
mailing list