1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-31 18:54:07 -05:00

Yet another possible segfault path in the backends fixed. I don't

_believe_ I'm still finding these. I have no idea what I was
thinking when I wrote this stuff.

[originally from svn r1162]
This commit is contained in:
Simon Tatham
2001-07-31 14:23:21 +00:00
parent 86e1a95166
commit a4c1aad9b2
4 changed files with 16 additions and 8 deletions

6
ssh.c
View File

@@ -1478,8 +1478,10 @@ static int ssh_closing(Plug plug, char *error_msg, int error_code,
int calling_back)
{
ssh_state = SSH_STATE_CLOSED;
sk_close(s);
s = NULL;
if (s) {
sk_close(s);
s = NULL;
}
if (error_msg) {
/* A socket error has occurred. */
connection_fatal(error_msg);