mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Add a check for NULL in pageant_forget_passphrases().
I've no reason to believe it will _currently_ be called with the 'passphrases' tree not even set up yet, but I managed to get that to happen while playing about with experimental code just now, and it seemed like a good safety check to keep in general.
This commit is contained in:
parent
75b7ba26d3
commit
ef3959992e
@ -1172,6 +1172,9 @@ static tree234 *passphrases = NULL;
|
|||||||
*/
|
*/
|
||||||
void pageant_forget_passphrases(void)
|
void pageant_forget_passphrases(void)
|
||||||
{
|
{
|
||||||
|
if (!passphrases) /* in case we never set it up at all */
|
||||||
|
return;
|
||||||
|
|
||||||
while (count234(passphrases) > 0) {
|
while (count234(passphrases) > 0) {
|
||||||
char *pp = index234(passphrases, 0);
|
char *pp = index234(passphrases, 0);
|
||||||
smemclr(pp, strlen(pp));
|
smemclr(pp, strlen(pp));
|
||||||
|
Loading…
Reference in New Issue
Block a user