Corey Stup points out a memory leak in the local-proxy implementations.
[u/mdw/putty] / windows / winproxy.c
index c8221ed..877dc5e 100644 (file)
@@ -39,7 +39,7 @@ int localproxy_gotdata(struct handle *h, void *data, int len)
     } else if (len == 0) {
        return plug_closing(ps->plug, NULL, 0, 0);
     } else {
-       return plug_receive(ps->plug, 1, data, len);
+       return plug_receive(ps->plug, 0, data, len);
     }
 }
 
@@ -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);