Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: memory leak in bin_ztcp
- X-seq: zsh-workers 26013
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: memory leak in bin_ztcp
- Date: Thu, 6 Nov 2008 01:32:23 +0000
- In-reply-to: <20081101181613.GA23978@xxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20081101181613.GA23978@xxxxxxxx>
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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author