diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-10-05 11:10:47 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-05 11:12:14 +0200 |
commit | 6092596199e8ebfbbf6e6ba48b7ec6ca0d85fa13 (patch) | |
tree | be28cb2bd1704453686cd5a33fab07d5f62d4bb5 /src | |
parent | 22f607649d7dc530df84b7b90781ce0b88153095 (diff) | |
download | libssh-6092596199e8ebfbbf6e6ba48b7ec6ca0d85fa13.tar.gz libssh-6092596199e8ebfbbf6e6ba48b7ec6ca0d85fa13.tar.xz libssh-6092596199e8ebfbbf6e6ba48b7ec6ca0d85fa13.zip |
getpass: Fix a memory leak in ssh_gets() on error.
Diffstat (limited to 'src')
-rw-r--r-- | src/getpass.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/getpass.c b/src/getpass.c index 0bb6a9a..4d3a404 100644 --- a/src/getpass.c +++ b/src/getpass.c @@ -62,6 +62,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; } |