From 5be2d7d52c081846997d21272d3b50c4c34c259a Mon Sep 17 00:00:00 2001 From: Alain Frisch Date: Thu, 2 Oct 2014 12:57:10 +0000 Subject: #6585: fix memory leak in win32unix/createprocess.c. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- otherlibs/win32unix/createprocess.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'otherlibs/win32unix/createprocess.c') diff --git a/otherlibs/win32unix/createprocess.c b/otherlibs/win32unix/createprocess.c index 0e1e37a24..3858a39b8 100644 --- a/otherlibs/win32unix/createprocess.c +++ b/otherlibs/win32unix/createprocess.c @@ -53,9 +53,11 @@ value win_create_process_native(value cmd, value cmdline, value env, /* Create the process */ if (! CreateProcess(exefile, String_val(cmdline), NULL, NULL, TRUE, flags, envp, NULL, &si, &pi)) { + caml_stat_free(exefile); win32_maperr(GetLastError()); uerror("create_process", cmd); } + caml_stat_free(exefile); CloseHandle(pi.hThread); /* Return the process handle as pseudo-PID (this is consistent with the wait() emulation in the MSVC C library */ -- cgit v1.2.3-70-g09d2