diff options
author | Jon Simons <jon@jonsimons.org> | 2013-10-23 12:25:28 -0700 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-10-24 10:37:59 +0200 |
commit | 54f89af6d3fea2614aaf191de0837e6bccebcc3a (patch) | |
tree | b465a2bb7c56e9f1c62d8fcf45ea24a6cd1615b6 | |
parent | 0e4a1b1f66402aadc19abae575209ee56224b224 (diff) | |
download | libssh-54f89af6d3fea2614aaf191de0837e6bccebcc3a.tar.gz libssh-54f89af6d3fea2614aaf191de0837e6bccebcc3a.tar.xz libssh-54f89af6d3fea2614aaf191de0837e6bccebcc3a.zip |
bind: fix leak in ssh_bind_accept error path
Use 'ssh_socket_free' to cleanup if 'ssh_bind_accept_fd'
fails, to be sure to free the ssh_socket in/out buffers.
-rw-r--r-- | src/bind.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -454,8 +454,7 @@ int ssh_bind_accept(ssh_bind sshbind, ssh_session session) { #else close(fd); #endif - if (session->socket) - ssh_socket_close(session->socket); + ssh_socket_free(session->socket); } return rc; } |