summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/dpxfile.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-13 08:04:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-13 08:04:29 +0000
commitd3850f75a016d3610f0170c7374a74ecad621851 (patch)
treee24b3b2b034088bad8d9403eb93c3d9dcd6f7364 /Build/source/texk/dvipdfm-x/dpxfile.c
parent671c56f896d842f33df4fb1d4289ccd9652c8544 (diff)
dvipdfm-x: Bug fix (uninitialized variables)
git-svn-id: svn://tug.org/texlive/trunk@32648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dpxfile.c')
-rw-r--r--Build/source/texk/dvipdfm-x/dpxfile.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c
index d6b7de4f8bf..9eaf7bbb259 100644
--- a/Build/source/texk/dvipdfm-x/dpxfile.c
+++ b/Build/source/texk/dvipdfm-x/dpxfile.c
@@ -48,6 +48,7 @@
#ifdef WIN32
#include <io.h>
#include <process.h>
+#include <wchar.h>
#else
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -246,6 +247,14 @@ static int exec_spawn (char *cmd)
}
*qvw = NULL;
ret = _wspawnvp (_P_WAIT, *cmdvw, (const wchar_t* const*) cmdvw);
+ if (cmdvw) {
+ qvw = cmdvw;
+ while (*qvw) {
+ free (*qvw);
+ qvw++;
+ }
+ free (cmdvw);
+ }
#else
i = fork ();
if (i < 0)
@@ -268,16 +277,6 @@ done:
qv++;
}
free (cmdv);
-#ifdef WIN32
- if (cmdvw) {
- qvw = cmdvw;
- while (*qvw) {
- free (*qvw);
- qvw++;
- }
- free (cmdvw);
- }
-#endif
return ret;
}