1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Fix a segfault on abrupt X connection shutdown.

[originally from svn r998]
This commit is contained in:
Simon Tatham
2001-03-15 11:19:59 +00:00
parent cb9c2e79b9
commit c760ef6f83
2 changed files with 5 additions and 2 deletions

View File

@ -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);