mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Unix Pageant: fix a double-free when adding keys.
I had freed the comment string coming back from pageant_add_keyfile, but not NULLed out the pointer, so that the cleanup code at the end of the function would have freed it again.
This commit is contained in:
parent
c6c23ed84b
commit
a181639521
@ -331,6 +331,7 @@ static int unix_add_keyfile(const char *filename_str)
|
|||||||
while (1) {
|
while (1) {
|
||||||
char *passphrase = askpass(err);
|
char *passphrase = askpass(err);
|
||||||
sfree(err);
|
sfree(err);
|
||||||
|
err = NULL;
|
||||||
if (!passphrase)
|
if (!passphrase)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user