Two more memory leak fixes, on error paths I didn't spot in r9919.
[u/mdw/putty] / unix / uxproxy.c
index aa1ff07..f808a67 100644 (file)
@@ -288,6 +288,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
     if (pipe(to_cmd_pipe) < 0 ||
        pipe(from_cmd_pipe) < 0) {
        ret->error = dupprintf("pipe: %s", strerror(errno));
+        sfree(cmd);
        return (Socket)ret;
     }
     cloexec(to_cmd_pipe[1]);