mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Fix memory leak found by Klocwork
--HG-- extra : convert_revision : 4b40828a0c3781bacfb2b92af639e88065bcc61a
This commit is contained in:
parent
a0aefb3d3f
commit
19b89a0e19
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user