summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wragg <david@rabbitmq.com>2010-07-28 23:03:59 +0100
committerDavid Wragg <david@rabbitmq.com>2010-07-28 23:03:59 +0100
commit8edd5fb6db1bd629e295e1932e69bfa3ee301e16 (patch)
tree15b110985e5ae59c1bc559f8c1c183e25d8581bf
parenteb2d565d5074f9a8a51ebd7234c986d0087d21dc (diff)
downloadrabbitmq-c-github-ask-bug22825.tar.gz
We were neglecting to free the constructed command linebug22825
And fix a tyop in an error message.
-rw-r--r--tools/windows/process.c4
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))