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

Fix a double-free in Windows Pageant.

Reported by Colin Harrison; occurred on the error path in which the
user clicks 'cancel' in the passphrase box.
This commit is contained in:
Simon Tatham 2015-10-18 20:22:05 +01:00
parent df006f36ce
commit c01dff38a3

View File

@ -377,11 +377,11 @@ static void win_add_keyfile(Filename *filename)
NULL, PassphraseProc, (LPARAM) &pps);
passphrase_box = NULL;
sfree(err);
if (!dlgret)
goto done; /* operation cancelled */
sfree(err);
assert(passphrase != NULL);
ret = pageant_add_keyfile(filename, passphrase, &err);