aboutsummaryrefslogtreecommitdiff
path: root/libssh/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libssh/client.c b/libssh/client.c
index 7cc6f7d1..5fdec8ee 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -628,13 +628,12 @@ char *ssh_get_issue_banner(SSH_SESSION *session) {
void ssh_disconnect(SSH_SESSION *session) {
STRING *str = NULL;
- enter_function();
-
if (session == NULL) {
- leave_function();
return;
}
+ enter_function();
+
if (ssh_socket_is_open(session->socket)) {
if (buffer_add_u8(session->out_buffer, SSH2_MSG_DISCONNECT) < 0) {
goto error;