diff options
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index ffb175e..7457c9b 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -104,7 +104,7 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) { struct Listener *listener = NULL; int nsocks; char* errstring = NULL; - // listen_spec = NULL indicates localhost + /* listen_spec = NULL indicates localhost */ const char* listen_spec = NULL; TRACE(("enter listen_tcpfwd")) @@ -126,12 +126,13 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) { TRACE(("leave listen_tcpfwd: dropbear_listen failed")) return DROPBEAR_FAILURE; } - + m_free(errstring); + + /* new_listener will close the socks if it fails */ listener = new_listener(socks, nsocks, CHANNEL_ID_TCPFORWARDED, tcpinfo, tcp_acceptor, cleanup_tcp); if (listener == NULL) { - m_free(tcpinfo); TRACE(("leave listen_tcpfwd: listener failed")) return DROPBEAR_FAILURE; } |