aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2013-12-09 12:38:55 -0800
committerAndreas Schneider <asn@cryptomilk.org>2013-12-11 21:03:43 +0100
commit50b9a182f52c38c877b60b781077d33061a78c7d (patch)
treee3fe90209dceb4a8ccd3c0f43d230e0545965756 /src
parentbb88b637a9349c8249be2e291c6e85860116ef76 (diff)
downloadlibssh-50b9a182f52c38c877b60b781077d33061a78c7d.tar.gz
libssh-50b9a182f52c38c877b60b781077d33061a78c7d.tar.xz
libssh-50b9a182f52c38c877b60b781077d33061a78c7d.zip
client: use ssh_channel_do_free in ssh_disconnect
Ensure to use 'ssh_channel_do_free' in 'ssh_disconnect', when removing and free'ing up a session's channels. This matches the behavior in 'ssh_free', and is necessary to fully free any channel which may not have been closed completely (see usage of flags SSH_CHANNEL_FLAG_CLOSED_REMOTE, SSH_CHANNEL_FLAG_FREED_LOCAL). Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c
index 18b40e94..9ababd09 100644
--- a/src/client.c
+++ b/src/client.c
@@ -652,7 +652,7 @@ error:
session->session_state=SSH_SESSION_STATE_DISCONNECTED;
while ((it=ssh_list_get_iterator(session->channels)) != NULL) {
- ssh_channel_free(ssh_iterator_value(ssh_channel,it));
+ ssh_channel_do_free(ssh_iterator_value(ssh_channel,it));
ssh_list_remove(session->channels, it);
}
if(session->current_crypto){