From: jacob Date: Wed, 2 Nov 2005 23:15:43 +0000 (+0000) Subject: When a userpass interaction has finished, make sure the 'prompts' structure X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/d8b4b829ad824924c8f55f624a07a30d9f939190?ds=sidebyside When a userpass interaction has finished, make sure the 'prompts' structure is safe for re-use. git-svn-id: svn://svn.tartarus.org/sgt/putty@6444 cda61777-01e9-0310-a592-d414129be87e --- 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 */ } }