* PATCH: memory leak in bin_ztcp
@ 2008-11-01 18:16 Clint Adams
2008-11-06 1:32 ` Clint Adams
0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2008-11-01 18:16 UTC (permalink / raw)
To: zsh-workers
CID 85.
remotename is only used in the printf which follows, so there's no need to
duplicate the string.
Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.47
diff -u -r1.47 tcp.c
--- Src/Modules/tcp.c 12 Jul 2007 03:09:13 -0000 1.47
+++ Src/Modules/tcp.c 1 Nov 2008 18:13:42 -0000
@@ -570,7 +570,7 @@
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: memory leak in bin_ztcp
2008-11-01 18:16 PATCH: memory leak in bin_ztcp Clint Adams
@ 2008-11-06 1:32 ` Clint Adams
0 siblings, 0 replies; 2+ messages in thread
From: Clint Adams @ 2008-11-06 1:32 UTC (permalink / raw)
To: zsh-workers
On Sat, Nov 01, 2008 at 06:16:13PM +0000, Clint Adams wrote:
> CID 85.
>
> remotename is only used in the printf which follows, so there's no need to
> duplicate the string.
Missed one.
Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.48
diff -u -r1.48 tcp.c
--- Src/Modules/tcp.c 1 Nov 2008 18:20:14 -0000 1.48
+++ Src/Modules/tcp.c 6 Nov 2008 01:17:38 -0000
@@ -565,7 +565,7 @@
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-06 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-01 18:16 PATCH: memory leak in bin_ztcp Clint Adams
2008-11-06 1:32 ` Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).