]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Null out the socket pointers in X- and port-forwarding channels for
authorSimon Tatham <anakin@pobox.com>
Wed, 17 Feb 2010 19:02:04 +0000 (19:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 17 Feb 2010 19:02:04 +0000 (19:02 +0000)
which we close the socket without destroying the channel. John
Peterson reports periodic crashes under heavy load which appear to
be fixed by this, though I don't know the exact circumstances
induced by that load.

[originally from svn r8871]

ssh.c

diff --git a/ssh.c b/ssh.c
index 068db3c89bccc86137e4efad32e8d83696303227..8887d9b426562f9f06cdf692ff9b5866d9dfe4b0 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -6670,11 +6670,13 @@ static void ssh2_msg_channel_eof(Ssh ssh, struct Packet *pktin)
         * wrap up and close the channel ourselves.
         */
        x11_close(c->u.x11.s);
+       c->u.x11.s = NULL;
        sshfwd_close(c);
     } else if (c->type == CHAN_AGENT) {
        sshfwd_close(c);
     } else if (c->type == CHAN_SOCKDATA) {
        pfd_close(c->u.pfd.s);
+       c->u.pfd.s = NULL;
        sshfwd_close(c);
     }
 }