diff options
-rw-r--r-- | svr-tcpfwd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c index 7b37449..bf529cc 100644 --- a/svr-tcpfwd.c +++ b/svr-tcpfwd.c @@ -213,12 +213,10 @@ static int svr_remotetcpreq() { 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); |