summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-03-19 09:24:54 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-03-19 09:24:54 +0000
commit7ee6847917bff2a1aa2efe598f3524a00c3ed3c5 (patch)
tree086c42932698b58d926c1786174e97b5f0f1fc9a /Build
parentca942b564310de16ca1b67d4823cabd4ba8c37dd (diff)
Avoid minor memory leaks (win32 only).
git-svn-id: svn://tug.org/texlive/trunk@36560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 0f006eb9b7f..bd74e66505f 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Avoid minor memory leaks (win32 only).
+
2015-03-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* synctex.c: Support multi-byte characters in file names in SyncTeX
diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c
index 274c331083e..32be0c3e62f 100644
--- a/Build/source/texk/web2c/synctexdir/synctex.c
+++ b/Build/source/texk/web2c/synctexdir/synctex.c
@@ -733,7 +733,9 @@ void synctexstartinput(void)
* to store the file name, because we will need it later.
* This is necessary because \jobname can be different */
#ifdef W32UPTEXSYNCTEX
- synctex_ctxt.root_name = chgto_oem(SYNCTEX_GET_CURRENT_NAME());
+ char *tmpa = SYNCTEX_GET_CURRENT_NAME();
+ synctex_ctxt.root_name = chgto_oem(tmpa);
+ free(tmpa);
#else
synctex_ctxt.root_name = SYNCTEX_GET_CURRENT_NAME();
#endif
@@ -749,7 +751,9 @@ void synctexstartinput(void)
if (SYNCTEX_FILE
|| (SYNCTEX_NO_ERROR != synctex_dot_open())) {
#ifdef W32UPTEXSYNCTEX
- char *tmp = chgto_oem(SYNCTEX_GET_CURRENT_NAME());
+ char *tmpb = SYNCTEX_GET_CURRENT_NAME();
+ char *tmp = chgto_oem(tmpb);
+ free(tmpb);
#else
char *tmp = SYNCTEX_GET_CURRENT_NAME();
#endif