summaryrefslogtreecommitdiff
path: root/dos2unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'dos2unix.c')
-rw-r--r--dos2unix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dos2unix.c b/dos2unix.c
index 6409408..ab63aaa 100644
--- a/dos2unix.c
+++ b/dos2unix.c
@@ -509,6 +509,10 @@ int main (int argc, char *argv[])
# endif
int argc_new;
char **argv_new;
+#ifdef D2U_UNIFILE
+ wchar_t **wargv;
+ char ***argv_glob;
+# endif
progname[8] = '\0';
strcpy(progname,"dos2unix");
@@ -569,8 +573,6 @@ int main (int argc, char *argv[])
#ifdef D2U_UNIFILE
/* Get arguments in wide Unicode format in the Windows Command Prompt */
- wchar_t **wargv;
- char ***argv_glob;
/* This does not support wildcard expansion (globbing) */
wargv = CommandLineToArgvW(GetCommandLineW(), &argc);
@@ -579,6 +581,7 @@ int main (int argc, char *argv[])
if (argv_glob == NULL) {
D2U_UTF8_FPRINTF(stderr, "%s:", progname);
D2U_ANSI_FPRINTF(stderr, " %s\n", strerror(errno));
+ free(pFlag);
return errno;
}
/* Glob the arguments and convert them to UTF-8 */