From 2c9c5367e6940cba12eb308fad1d583c069bbdd6 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 3 Dec 2017 20:27:08 +1030 Subject: [PATCH 13/13] PDFDoc: remove unsused getFileNameU() --- poppler/PDFDoc.cc | 3 ++- poppler/PDFDoc.h | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index cfcd70c2..4627272e 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -172,7 +172,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, // save both Unicode and 8-bit copies of the file name fileName = new GooString(); - fileNameU = (wchar_t *)gmallocn(fileNameLen + 1, sizeof(wchar_t)); + wchar_t *fileNameU = (wchar_t *)gmallocn(fileNameLen + 1, sizeof(wchar_t)); for (i = 0; i < fileNameLen; ++i) { fileName->append((char)fileNameA[i]); fileNameU[i] = fileNameA[i]; @@ -188,6 +188,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, } else { file = GooFile::open(fileName); } + gfree(fileNameU); if (!file) { error(errIO, -1, "Couldn't open file '{0:t}'", fileName); errCode = errOpenFile; diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h index 48d8dcf7..22aedc80 100644 --- a/poppler/PDFDoc.h +++ b/poppler/PDFDoc.h @@ -106,9 +106,6 @@ public: // Get file name. GooString *getFileName() { return fileName; } -#ifdef _WIN32 - wchar_t *getFileNameU() { return fileNameU; } -#endif // Get the linearization table. Linearization *getLinearization(); @@ -353,9 +350,6 @@ private: void setDocInfoModified(Object *infoObj); GooString *fileName; -#ifdef _WIN32 - wchar_t *fileNameU; -#endif GooFile *file; BaseStream *str; void *guiData; -- 2.11.0