1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

ssh_poll_handle detaches from context before free

This commit is contained in:
Aris Adamantiadis
2009-12-13 17:04:23 +01:00
parent ad7e9d88fb
commit 964d5f88cc

View File

@@ -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);
}