From: jacob Date: Fri, 21 Aug 2009 21:16:22 +0000 (+0000) Subject: Corey Stup points out a memory leak in the local-proxy implementations. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/53e66fad5465e72c7231ff4af272ab584dd33f1a Corey Stup points out a memory leak in the local-proxy implementations. git-svn-id: svn://svn.tartarus.org/sgt/putty@8626 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxproxy.c b/unix/uxproxy.c index ddc55800..792bbdc2 100644 --- a/unix/uxproxy.c +++ b/unix/uxproxy.c @@ -286,6 +286,8 @@ Socket platform_new_connection(SockAddr addr, char *hostname, _exit(255); } + sfree(cmd); + close(to_cmd_pipe[0]); close(from_cmd_pipe[1]); diff --git a/windows/winproxy.c b/windows/winproxy.c index bec00840..877dc5e1 100644 --- a/windows/winproxy.c +++ b/windows/winproxy.c @@ -199,6 +199,8 @@ Socket platform_new_connection(SockAddr addr, char *hostname, CREATE_NO_WINDOW | NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi); + sfree(cmd); + CloseHandle(cmd_from_us); CloseHandle(cmd_to_us);