Mercurial > dropbear
changeset 619:35d27c1d0ee7
Fix leak found by Klocwork
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 07 Apr 2011 13:38:27 +0000 |
parents | b5cc8878d5ec |
children | 79d48028457c |
files | svr-tcpfwd.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
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);