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:
parent
869ce8867e
commit
55cea187e9
6
cmdgen.c
6
cmdgen.c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user