1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

cmdgen: fix double-free on exit.

Freeing ssh1key->comment before calling freersakey() on the whole of
ssh1key is redundant, and worse, because we also didn't null out the
freed pointer, causes a double-free.
This commit is contained in:
Simon Tatham 2019-01-17 18:26:24 +00:00
parent 6dc8860f8a
commit eec6666ff9

View File

@ -1064,7 +1064,6 @@ int main(int argc, char **argv)
} }
if (ssh1key) { if (ssh1key) {
sfree(ssh1key->comment);
freersakey(ssh1key); freersakey(ssh1key);
} }
if (ssh2key) { if (ssh2key) {