A user points out that we should free the 'hProcess' and 'hThread'
[sgt/putty] / windows / window.c
index 85b4699..5eb1d04 100644 (file)
@@ -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);