Fixes (mostly from Colin Watson, a couple redone by me) to make Unix
[u/mdw/putty] / unix / uxproxy.c
index f4e6758..792bbdc 100644 (file)
@@ -209,7 +209,7 @@ static int localproxy_select_result(int fd, int event)
        } else if (ret == 0) {
            return plug_closing(s->plug, NULL, 0, 0);
        } else {
-           return plug_receive(s->plug, 1, buf, ret);
+           return plug_receive(s->plug, 0, buf, ret);
        }
     } else if (event == 2) {
        assert(fd == s->to_cmd);
@@ -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]);