A user points out that we should free the 'hProcess' and 'hThread'
[sgt/putty] / windows / winproxy.c
index 8be22ea..75a7852 100644 (file)
@@ -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);