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

Fix miscellaneous minor memory leaks.

All found by Coverity.
This commit is contained in:
Simon Tatham
2019-05-04 16:19:13 +01:00
parent e82ba498ff
commit 64fdc85b2d
6 changed files with 15 additions and 3 deletions

View File

@ -1213,6 +1213,8 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase,
*/
*retstr = dupstr(error);
sfree(rkey);
if (comment)
sfree(comment);
return PAGEANT_ACTION_FAILURE;
} else if (ret == 1) {
/*
@ -1309,6 +1311,8 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase,
return PAGEANT_ACTION_FAILURE;
}
ssh_key_free(skey->key);
sfree(skey);
sfree(response);
} else {
if (!pageant_add_ssh2_key(skey)) {