summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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