mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-11 08:08:06 -05:00
When a userpass interaction has finished, make sure the 'prompts' structure
is safe for re-use. [originally from svn r6444]
This commit is contained in:
parent
6724e01956
commit
f164b330ae
@ -6396,6 +6396,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
|
||||
/* Immediate abort. */
|
||||
term_data(term, 0, "\r\n", 2);
|
||||
sfree(s);
|
||||
p->data = NULL;
|
||||
return 0; /* user abort */
|
||||
default:
|
||||
/*
|
||||
@ -6421,6 +6422,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
|
||||
return -1; /* more data required */
|
||||
} else {
|
||||
sfree(s);
|
||||
p->data = NULL;
|
||||
return +1; /* all done */
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user