mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
A user points out that we should free the 'hProcess' and 'hThread'
handles returned in the PROCESS_INFORMATION structure after we call CreateProcess. [originally from svn r9686]
This commit is contained in:
parent
74902c6966
commit
8e56c52eaa
@ -2156,6 +2156,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
si.lpReserved2 = NULL;
|
||||
CreateProcess(b, cl, NULL, NULL, inherit_handles,
|
||||
NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi);
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
if (filemap)
|
||||
CloseHandle(filemap);
|
||||
|
@ -206,6 +206,8 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
|
||||
CreateProcess(NULL, cmd, NULL, NULL, TRUE,
|
||||
CREATE_NO_WINDOW | NORMAL_PRIORITY_CLASS,
|
||||
NULL, NULL, &si, &pi);
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
sfree(cmd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user