]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Corey Stup points out a memory leak in the local-proxy implementations.
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Fri, 21 Aug 2009 21:16:22 +0000 (21:16 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Fri, 21 Aug 2009 21:16:22 +0000 (21:16 +0000)
[originally from svn r8626]

unix/uxproxy.c
windows/winproxy.c

index ddc55800d07e17a8678fbc7b9395d873a07dd1a6..792bbdc235a642b3175b5010d0318618eb2c809e 100644 (file)
@@ -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]);
 
index bec008400e610309611bbd07426c19ebd6f8d11c..877dc5e12440b8946cd21947efa53d08dc4f24c9 100644 (file)
@@ -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);