1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Fix some minor memory leaks in cmdgen.

I happened to run cmdgen under Leak Sanitiser, and found it was
_almost_ clean - clean enough that if I fix the last few leaks then it
might be worth running it again from time to time.
This commit is contained in:
Simon Tatham 2018-12-30 14:14:59 +00:00
parent 869ce8867e
commit 55cea187e9

View File

@ -1067,12 +1067,16 @@ int main(int argc, char **argv)
sfree(new_passphrase);
}
if (ssh1key)
if (ssh1key) {
sfree(ssh1key->comment);
freersakey(ssh1key);
}
if (ssh2key) {
sfree(ssh2key->comment);
ssh_key_free(ssh2key->key);
sfree(ssh2key);
}
filename_free(outfilename);
return 0;
}