summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-08-11 13:15:23 +0200
committerAndreas Schneider <mail@cynapses.org>2009-08-12 22:12:18 +0200
commitc87b247e013e37c82e4b394c6f9a6e522f695aca (patch)
tree46e5d968a5fb1ec7e337bbe48d225e387949e29b
parent9abdc5ae2aa61eb7ef3b7686e9b8341ea003328a (diff)
downloadlibssh-c87b247e013e37c82e4b394c6f9a6e522f695aca.tar.gz
libssh-c87b247e013e37c82e4b394c6f9a6e522f695aca.tar.xz
libssh-c87b247e013e37c82e4b394c6f9a6e522f695aca.zip
Fix memory leak introduced by previous bugfix
-rw-r--r--libssh/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libssh/session.c b/libssh/session.c
index 4117309d..1ca0a6c8 100644
--- a/libssh/session.c
+++ b/libssh/session.c
@@ -97,8 +97,9 @@ void ssh_cleanup(SSH_SESSION *session) {
SAFE_FREE(session->serverbanner);
SAFE_FREE(session->clientbanner);
SAFE_FREE(session->banner);
- buffer_reinit(session->in_buffer);
- buffer_reinit(session->out_buffer);
+ buffer_free(session->in_buffer);
+ buffer_free(session->out_buffer);
+ session->in_buffer=session->out_buffer=NULL;
crypto_free(session->current_crypto);
crypto_free(session->next_crypto);
ssh_socket_free(session->socket);