about summary refs log tree commit diff
path: root/Src/Modules/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/tcp.c')
-rw-r--r--Src/Modules/tcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index f4339e134..c70d5bf69 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -534,6 +534,7 @@ bin_ztcp(char *nam, char **args, char *ops, int func)
 	}
 	sess = zts_alloc(ZTCP_INBOUND);
 
+	len = sizeof(sess->peer.in);
 	if ((rfd = accept(lfd, (struct sockaddr *)&sess->peer.in, &len)) == -1)
 	{
 	    zwarnnam(nam, "could not accept connection: %e", NULL, errno);