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

Fix assorted minor memory leaks.

All found by Coverity.
This commit is contained in:
Simon Tatham
2020-06-16 17:43:36 +01:00
parent 08f1e2a506
commit 44adc8be1b
7 changed files with 16 additions and 5 deletions

View File

@ -538,8 +538,10 @@ static ssh2_userkey *openssh_pem_read(
strbuf *blob = strbuf_new_nm();
int privptr = 0, publen;
if (!key)
if (!key) {
strbuf_free(blob);
return NULL;
}
if (key->encrypted) {
unsigned char keybuf[32];