When a userpass interaction has finished, make sure the 'prompts' structure
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Wed, 2 Nov 2005 23:15:43 +0000 (23:15 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Wed, 2 Nov 2005 23:15:43 +0000 (23:15 +0000)
is safe for re-use.

git-svn-id: svn://svn.tartarus.org/sgt/putty@6444 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index d712fc9..7552e39 100644 (file)
@@ -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 */
     }
 }