#6585: fix memory leak in win32unix/createprocess.c.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
eb0beeba69
commit
5be2d7d52c
1
Changes
1
Changes
|
@ -13,6 +13,7 @@ Runtime system:
|
|||
Standard library:
|
||||
- PR#6577: improve performance of %L, %l, %n, %S, %C format specifiers
|
||||
(Alain Frisch)
|
||||
- PR#6585: fix memory leak in win32unix/createprocess.c
|
||||
|
||||
Type system:
|
||||
- PR#6374: allow "_ t" as a short-hand for "(_, _, ..) t" for n-ary type
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue