Skip to content
Snippets Groups Projects
Commit 3d425a47 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Be sure to close ssh_sock regardless of ssh_active

parent 8bc6f5f8
Branches
Tags
No related merge requests found
Pipeline #6655 passed
...@@ -1021,11 +1021,11 @@ ssh_close(void) ...@@ -1021,11 +1021,11 @@ ssh_close(void)
sftpc_end(sftp_state); sftpc_end(sftp_state);
close_ssh_channel(); close_ssh_channel();
cryptDestroySession(ssh_session); cryptDestroySession(ssh_session);
}
if (ssh_sock != INVALID_SOCKET) { if (ssh_sock != INVALID_SOCKET) {
closesocket(ssh_sock); closesocket(ssh_sock);
ssh_sock = INVALID_SOCKET; ssh_sock = INVALID_SOCKET;
} }
}
destroy_conn_buf(&conn_inbuf); destroy_conn_buf(&conn_inbuf);
destroy_conn_buf(&conn_outbuf); destroy_conn_buf(&conn_outbuf);
FREE_AND_NULL(conn_api.rd_buf); FREE_AND_NULL(conn_api.rd_buf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment