diff options
author | Matt Johnston <matt@ucc.asn.au> | 2006-11-02 16:45:43 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2006-11-02 16:45:43 +0000 |
commit | 19b89a0e19b32b8f18bb34cd1fa3f2499bf0fc42 (patch) | |
tree | 63e144857192a6d2223999f4c30f790b5d4a5a39 /tcp-accept.c | |
parent | a0aefb3d3f8370e1ccf3121de4024a38c79e088f (diff) |
Fix memory leak found by Klocwork
--HG--
extra : convert_revision : 4b40828a0c3781bacfb2b92af639e88065bcc61a
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index ffb175e..14a6312 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -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; } |