mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +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);
|
sfree(new_passphrase);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssh1key)
|
if (ssh1key) {
|
||||||
|
sfree(ssh1key->comment);
|
||||||
freersakey(ssh1key);
|
freersakey(ssh1key);
|
||||||
|
}
|
||||||
if (ssh2key) {
|
if (ssh2key) {
|
||||||
|
sfree(ssh2key->comment);
|
||||||
ssh_key_free(ssh2key->key);
|
ssh_key_free(ssh2key->key);
|
||||||
sfree(ssh2key);
|
sfree(ssh2key);
|
||||||
}
|
}
|
||||||
|
filename_free(outfilename);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user