diff options
author | Alain Frisch <alain@frisch.fr> | 2014-10-02 12:57:10 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2014-10-02 12:57:10 +0000 |
commit | 5be2d7d52c081846997d21272d3b50c4c34c259a (patch) | |
tree | beb81f7c968cffd9d8601ddfc4332e60e575dc65 /otherlibs/win32unix/createprocess.c | |
parent | eb0beeba69a04383b11d16ab77117a82561787d5 (diff) |
#6585: fix memory leak in win32unix/createprocess.c.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/createprocess.c')
-rw-r--r-- | otherlibs/win32unix/createprocess.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |