aboutsummaryrefslogtreecommitdiff
path: root/src/client.c
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:02:05 +0100
commit0557f57c63539b98a60211c8a4b5b81a2f61c95e (patch)
tree69967f3d98d24e54451de5b6a906be671d44dd39 /src/client.c
parent4f4e917187742e033db8d1888734e7492ddd208b (diff)
downloadlibssh-0557f57c63539b98a60211c8a4b5b81a2f61c95e.tar.gz
libssh-0557f57c63539b98a60211c8a4b5b81a2f61c95e.tar.xz
libssh-0557f57c63539b98a60211c8a4b5b81a2f61c95e.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/client.c')
-rw-r--r--src/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c
index 35c396aa..8951e8d8 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){