From: Jacob Nevins Date: Wed, 2 Nov 2005 23:15:43 +0000 (+0000) Subject: When a userpass interaction has finished, make sure the 'prompts' structure X-Git-Tag: 0.59~192 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f164b330ae8272da720af5891da647e5c619a651;p=PuTTY.git When a userpass interaction has finished, make sure the 'prompts' structure is safe for re-use. [originally from svn r6444] --- diff --git a/terminal.c b/terminal.c index d712fc90..7552e39d 100644 --- a/terminal.c +++ b/terminal.c @@ -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 */ } }