about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/tcp.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 83fce61ae..acd225ff6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-11-01  Clint Adams  <clint@zsh.org>
 
+	* 25987: Src/Modules/tcp.c: don't ztrdup the buffer returned by
+	inet_ntoa.
+
 	* 25985: Src/hashtable.c: don't try to disable signal traps if
 	getsignum returns -1.
 
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index d1d4e5002..da70855ed 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -570,7 +570,7 @@ bin_ztcp(char *nam, char **args, Options ops, UNUSED(int func))
 		    if (ztpeer)
 			remotename = ztpeer->h_name;
 		    else
-			remotename = ztrdup(inet_ntoa(sess->peer.in.sin_addr));
+			remotename = inet_ntoa(sess->peer.in.sin_addr);
 		    if (OPT_ISSET(ops,'L')) {
 			int schar;
 			if (sess->flags & ZTCP_ZFTP)