diff options
Diffstat (limited to 'libssh/server.c')
-rw-r--r-- | libssh/server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libssh/server.c b/libssh/server.c index a2d9d48f..066760f0 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -151,6 +151,14 @@ SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind){ session->rsa_key=rsa; return session; } + +void ssh_bind_free(SSH_BIND *ssh_bind){ + if(ssh_bind->bindfd>=0) + close(ssh_bind->bindfd); + ssh_bind->bindfd=-1; + free(ssh_bind); +} + extern char *supported_methods[]; int server_set_kex(SSH_SESSION * session) { |