diff options
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/session.c b/src/session.c index dbcb2809..cda01db8 100644 --- a/src/session.c +++ b/src/session.c @@ -178,6 +178,9 @@ void ssh_free(ssh_session session) { crypto_free(session->current_crypto); crypto_free(session->next_crypto); ssh_socket_free(session->socket); + if(session->default_poll_ctx){ + ssh_poll_ctx_free(session->default_poll_ctx); + } /* delete all channels */ while (session->channels) { ssh_channel_free(session->channels); @@ -365,7 +368,7 @@ int ssh_handle_packets(ssh_session session, int timeout) { ssh_poll_add_events(spoll_in, POLLIN | POLLERR); ctx=ssh_poll_get_ctx(spoll_in); if(ctx==NULL){ - ctx=ssh_get_global_poll_ctx(session); + ctx=ssh_poll_get_default_ctx(session); ssh_poll_ctx_add(ctx,spoll_in); if(spoll_in != spoll_out) ssh_poll_ctx_add(ctx,spoll_out); |