diff cli-tcpfwd.c @ 184:ca55377e4f7e

- allocate correct buffer size for channel info, rather than sizeof(pointer).
author Matt Johnston <matt@ucc.asn.au>
date Sun, 24 Apr 2005 10:30:33 +0000
parents 0cfba3034be5
children 84925eceeb13
line wrap: on
line diff
--- a/cli-tcpfwd.c	Fri Apr 22 14:52:27 2005 +0000
+++ b/cli-tcpfwd.c	Sun Apr 24 10:30:33 2005 +0000
@@ -94,7 +94,7 @@
 	TRACE(("enter cli_localtcp: %d %s %d", listenport, remoteaddr,
 				remoteport));
 
-	tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener*));
+	tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener));
 	tcpinfo->sendaddr = m_strdup(remoteaddr);
 	tcpinfo->sendport = remoteport;
 	tcpinfo->listenport = listenport;