1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-16 12:21:18 +02:00

26013: don't ztrdup the other buffer returned by inet_ntoa. cf. 25987.

This commit is contained in:
Clint Adams 2008-11-06 01:35:12 +00:00
parent 60b410fd7c
commit cbc24017fe
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-11-06 Clint Adams <clint@zsh.org>
* 26013: Src/Modules/tcp.c: don't ztrdup the other buffer returned
by inet_ntoa. cf. 25987.
2008-11-05 Peter Stephenson <pws@csr.com>
* 26008, Src/builtin.c, Test/B02typeset.ztst: "typeset -g

View file

@ -565,7 +565,7 @@ bin_ztcp(char *nam, char **args, Options ops, UNUSED(int func))
if (zthost)
localname = zthost->h_name;
else
localname = ztrdup(inet_ntoa(sess->sock.in.sin_addr));
localname = inet_ntoa(sess->sock.in.sin_addr);
ztpeer = gethostbyaddr((const void *)&(sess->peer.in.sin_addr), sizeof(sess->peer.in.sin_addr), AF_INET);
if (ztpeer)
remotename = ztpeer->h_name;