# HG changeset patch # User Matt Johnston # Date 1302183507 0 # Node ID 35d27c1d0ee7b3bf6e45b1f4c17a6680e931d40f # Parent b5cc8878d5eca3328b248dccf9065a2cc456928a Fix leak found by Klocwork diff -r b5cc8878d5ec -r 35d27c1d0ee7 svr-tcpfwd.c --- 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);