From 964d5f88cceca5134ad03822ad1b1c47669f7d5c Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 13 Dec 2009 17:04:23 +0100 Subject: ssh_poll_handle detaches from context before free --- libssh/poll.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- cgit