diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-06-12 10:39:25 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-06-12 10:39:25 +0000 |
commit | bbfba2e99d6a1f7490fe73fde3e3bca4474adb4c (patch) | |
tree | 590c629bbe62ea2f8e949a2cef3e6a95bd09df26 /Build | |
parent | a1408b6c85b55e6a966ba7c6e2bf2c7ec38c3518 (diff) |
Free unused memory (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@47995 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 13ab1e6e062..614e772c8f7 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,7 @@ +2018-06-12 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * pdftoepdf.cc: Free unused memory (w32 only). + 2018-06-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * pdftoepdf.cc: Remove xfree(file_name) in order to avoid diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc index eba6448ce77..7443e0249ae 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -167,10 +167,12 @@ static PdfDocument *find_add_document(char *file_name) { PdfDocument *p = pdfDocuments; #ifdef _WIN32 + int file_name_is_changed = 0; wchar_t *fnamew; if (file_system_codepage == CP_UTF8 && win32_codepage != CP_UTF8) { fnamew = get_wstring_from_mbstring(CP_UTF8, file_name, fnamew=NULL); file_name = get_mbstring_from_wstring(win32_codepage, fnamew, file_name=NULL); + file_name_is_changed = 1; xfree(fnamew); } #endif @@ -193,6 +195,10 @@ static PdfDocument *find_add_document(char *file_name) p->inObjList = 0; p->next = pdfDocuments; pdfDocuments = p; +#ifdef _WIN32 + if (file_name_is_changed == 1) + xfree(file_name); +#endif return p; } |