summaryrefslogtreecommitdiffstats
path: root/libssh/poll.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/poll.c')
-rw-r--r--libssh/poll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libssh/poll.c b/libssh/poll.c
index ac86750..f03f3d4 100644
--- a/libssh/poll.c
+++ b/libssh/poll.c
@@ -274,6 +274,10 @@ ssh_poll_handle ssh_poll_new(socket_t fd, short events, ssh_poll_callback cb,
*/
void ssh_poll_free(ssh_poll_handle p) {
+ if(p->ctx != NULL){
+ ssh_poll_ctx_remove(p->ctx,p);
+ p->ctx=NULL;
+ }
SAFE_FREE(p);
}