diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/windows/process.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/windows/process.c b/tools/windows/process.c index 9a0b893..0a005bd 100644 --- a/tools/windows/process.c +++ b/tools/windows/process.c @@ -69,7 +69,7 @@ void die_windows_error(const char *fmt, ...) NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&msg, 0, NULL)) - msg = "(failed to retrieving Windows error message)"; + msg = "(failed to retrieve Windows error message)"; fprintf(stderr, ": %s\n", msg); exit(1); @@ -170,6 +170,8 @@ void pipeline(const char *const *argv, struct pipeline *pl) NULL, NULL, &start_info, &proc_info)) die_windows_error("CreateProcess"); + free(cmdline); + if (!CloseHandle(proc_info.hThread)) die_windows_error("CloseHandle for thread"); if (!CloseHandle(in_read_handle)) |