mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
NULL a couple of members after freeing them in ssh_free(). In particular,
should stop ssh_do_close() accessing freed ssh->channels when invoked later from ssh_free(). Spotted by Fred Sauer. (Perhaps this is the cause of the crashes people have been reporting on abnormal closures such as `Software caused connection abort'? I've not been able to test this.) [originally from svn r4946]
This commit is contained in:
parent
3d3273337c
commit
d46ebde528
2
ssh.c
2
ssh.c
@ -7235,12 +7235,14 @@ static void ssh_free(void *handle)
|
||||
sfree(c);
|
||||
}
|
||||
freetree234(ssh->channels);
|
||||
ssh->channels = NULL;
|
||||
}
|
||||
|
||||
if (ssh->rportfwds) {
|
||||
while ((pf = delpos234(ssh->rportfwds, 0)) != NULL)
|
||||
sfree(pf);
|
||||
freetree234(ssh->rportfwds);
|
||||
ssh->rportfwds = NULL;
|
||||
}
|
||||
sfree(ssh->deferred_send_data);
|
||||
if (ssh->x11auth)
|
||||
|
Loading…
Reference in New Issue
Block a user