about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-11-01 18:20:14 +0000
committerClint Adams <clint@users.sourceforge.net>2008-11-01 18:20:14 +0000
commit1b78e1a9121111ccb628262202c112c199ffc6d9 (patch)
tree1da891e33b36e9737f45b7c0334a5e361c8176e8
parent484644676af2f83434f0f9bed9b23d7cecab16e8 (diff)
downloadzsh-1b78e1a9121111ccb628262202c112c199ffc6d9.tar.gz
zsh-1b78e1a9121111ccb628262202c112c199ffc6d9.tar.xz
zsh-1b78e1a9121111ccb628262202c112c199ffc6d9.zip
25987: don't ztrdup the buffer returned by inet_ntoa.
-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)