From: simon Date: Wed, 17 Feb 2010 19:02:04 +0000 (+0000) Subject: Null out the socket pointers in X- and port-forwarding channels for X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/5959132ddc73fb4f955c97cb3130ebc49ee58612?hp=95ac8831138b0bc8d10fcbf96d091ab3458f540d Null out the socket pointers in X- and port-forwarding channels for 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@8871 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/ssh.c b/ssh.c index 068db3c8..8887d9b4 100644 --- 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); } }