1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Fix assorted memory leaks.

All spotted by Coverity.
This commit is contained in:
Simon Tatham
2014-11-22 09:58:15 +00:00
parent b6c2346173
commit 90dcef3d9e
3 changed files with 19 additions and 2 deletions

3
ssh.c
View File

@ -3867,6 +3867,7 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
s->dlgret = verify_ssh_manual_host_key(ssh, fingerprint, NULL, NULL);
if (s->dlgret == 0) { /* did not match */
bombout(("Host key did not appear in manually configured list"));
sfree(keystr);
crStop(0);
} else if (s->dlgret < 0) { /* none configured; use standard handling */
ssh_set_frozen(ssh, 1);
@ -3893,6 +3894,8 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
NULL, 0, TRUE);
crStop(0);
}
} else {
sfree(keystr);
}
}