getpass: Fix a memory leak in ssh_gets() on error.

(cherry picked from commit 6092596199)
This commit is contained in:
Andreas Schneider
2012-10-05 11:10:47 +02:00
parent 97b263aee9
commit dc8f0cddee

View File

@@ -61,6 +61,7 @@ static int ssh_gets(const char *prompt, char *buf, size_t len, int verify) {
}
fflush(stdout);
if (fgets(tmp, len, stdin) == NULL) {
free(tmp);
return 0;
}