Mercurial > dropbear
diff svr-tcpfwd.c @ 619:35d27c1d0ee7
Fix leak found by Klocwork
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 07 Apr 2011 13:38:27 +0000 |
parents | 69e98c45db7c |
children | 79d48028457c |
line wrap: on
line diff
--- a/svr-tcpfwd.c Thu Apr 07 13:33:26 2011 +0000 +++ b/svr-tcpfwd.c Thu Apr 07 13:38:27 2011 +0000 @@ -213,12 +213,10 @@ if (!opts.listen_fwd_all || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) { // NULL means "localhost only" - tcpinfo->listenaddr = NULL; + m_free(bindaddr); + bindaddr = NULL; } - else - { - tcpinfo->listenaddr = bindaddr; - } + tcpinfo->listenaddr = bindaddr; ret = listen_tcpfwd(tcpinfo);