From 51be125ff9b36a5e9309f9f62bf911249b04ef1a Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Sun, 24 Apr 2005 10:30:33 +0000
Subject: [PATCH] - allocate correct buffer size for channel info, rather than
 sizeof(pointer).

--HG--
extra : convert_revision : 0f2848d140f76a1dabbe5930e9b0a5d4f282f90b
---
 cli-tcpfwd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index aa5b7201..300a2fab 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -94,7 +94,7 @@ static int cli_localtcp(unsigned int listenport, const char* remoteaddr,
 	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;
-- 
GitLab