Fix leak found by Klocwork

--HG--
extra : convert_revision : 51ce088e100e9ea150efc6bf3d021f019a46b2f5
This commit is contained in:
Matt Johnston 2011-04-07 13:38:27 +00:00
parent b272b967e2
commit 665b768cef

View File

@ -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);