From 6ec65c6f9d1aefddaccf0a9816dae0b68a46ea33 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Fri, 9 Oct 2009 22:50:48 +0200 Subject: ssh_disconnect doesn't free the session anymore --- libssh/session.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libssh/session.c') diff --git a/libssh/session.c b/libssh/session.c index a03b765f..a06c4f68 100644 --- a/libssh/session.c +++ b/libssh/session.c @@ -98,11 +98,16 @@ ssh_session ssh_new(void) { return session; err: - ssh_cleanup(session); + ssh_free(session); return NULL; } -void ssh_cleanup(ssh_session session) { +/** + * @brief deallocate a session handle + * @see ssh_disconnect() + * @see ssh_new() + */ +void ssh_free(ssh_session session) { int i; enter_function(); @@ -182,7 +187,7 @@ void ssh_silent_disconnect(ssh_session session) { ssh_socket_close(session->socket); session->alive = 0; ssh_disconnect(session); - /* FIXME: leave_function(); ??? */ + leave_function(); } /** \brief set the session in blocking/nonblocking mode -- cgit