diff svr-tcpfwd.c @ 1334:c8114a48837c

listenaddr must be malloced
author Matt Johnston <matt@ucc.asn.au>
date Tue, 16 May 2017 23:04:57 +0800
parents 9169e4e7cbee
children 8747c2b19152
line wrap: on
line diff
--- a/svr-tcpfwd.c	Sat May 13 23:43:09 2017 +0800
+++ b/svr-tcpfwd.c	Tue May 16 23:04:57 2017 +0800
@@ -199,7 +199,7 @@
 	}
 	else
 	{
-		tcpinfo->listenaddr = request_addr;
+		tcpinfo->listenaddr = m_strdup(request_addr);
 	}
 
 	ret = listen_tcpfwd(tcpinfo);