aboutsummaryrefslogtreecommitdiff
path: root/libssh/auth.c
diff options
context:
space:
mode:
authormilo <milo.sshiva@gmail.com>2009-07-28 18:01:07 +0200
committerAndreas Schneider <mail@cynapses.org>2009-08-06 10:29:36 +0200
commit1b9676a0cc28e5dab6cea5ffe7c9fcd0fa10d9d8 (patch)
tree695104dd824160af03c02826f0e370ec524d0204 /libssh/auth.c
parentf4b3ef7604eac4a564159879ee2a5edb04a2c223 (diff)
downloadlibssh-1b9676a0cc28e5dab6cea5ffe7c9fcd0fa10d9d8.tar.gz
libssh-1b9676a0cc28e5dab6cea5ffe7c9fcd0fa10d9d8.tar.xz
libssh-1b9676a0cc28e5dab6cea5ffe7c9fcd0fa10d9d8.zip
Fix possible memory corruption (#14)
Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'libssh/auth.c')
-rw-r--r--libssh/auth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index 96b41102..8a3e597e 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -268,7 +268,7 @@ int ssh_userauth_none(SSH_SESSION *session, const char *username) {
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(service);
string_free(method);
string_free(user);
@@ -382,7 +382,7 @@ int ssh_userauth_offer_pubkey(SSH_SESSION *session, const char *username,
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(user);
string_free(method);
string_free(service);
@@ -503,7 +503,7 @@ int ssh_userauth_pubkey(SSH_SESSION *session, const char *username,
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(user);
string_free(service);
string_free(method);
@@ -627,7 +627,7 @@ int ssh_userauth_agent_pubkey(SSH_SESSION *session, const char *username,
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(sign);
string_free(user);
string_free(service);
@@ -739,7 +739,7 @@ int ssh_userauth_password(SSH_SESSION *session, const char *username,
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(user);
string_free(service);
string_free(method);
@@ -1137,7 +1137,7 @@ static int kbdauth_init(SSH_SESSION *session, const char *user,
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_free(usr);
string_free(service);
string_free(method);
@@ -1304,7 +1304,7 @@ static int kbdauth_send(SSH_SESSION *session) {
leave_function();
return rc;
error:
- buffer_free(session->out_buffer);
+ buffer_reinit(session->out_buffer);
string_burn(answer);
string_free(answer);