mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix a segfault on abrupt X connection shutdown.
[originally from svn r998]
This commit is contained in:
parent
cb9c2e79b9
commit
c760ef6f83
2
ssh.c
2
ssh.c
@ -1982,7 +1982,7 @@ static int do_ssh1_login(unsigned char *in, int inlen, int ispkt)
|
||||
}
|
||||
|
||||
void sshfwd_close(struct ssh_channel *c) {
|
||||
if (c) {
|
||||
if (c && !c->closes) {
|
||||
if (ssh_version == 1) {
|
||||
send_packet(SSH1_MSG_CHANNEL_CLOSE, PKT_INT, c->remoteid, PKT_END);
|
||||
} else {
|
||||
|
5
x11fwd.c
5
x11fwd.c
@ -189,7 +189,10 @@ char *x11_init (Socket *s, char *display, void *c) {
|
||||
}
|
||||
|
||||
void x11_close (Socket s) {
|
||||
struct X11Private *pr = (struct X11Private *)sk_get_private_ptr(s);
|
||||
struct X11Private *pr;
|
||||
if (!s)
|
||||
return;
|
||||
pr = (struct X11Private *)sk_get_private_ptr(s);
|
||||
|
||||
if (pr->auth_protocol) {
|
||||
sfree(pr->auth_protocol);
|
||||
|
Loading…
Reference in New Issue
Block a user