Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2002 19:57:24 +0800
From:      Eugene Grosbein <eugen@grosbein.pp.ru>
To:        Maxim Konovalov <maxim@macomnet.ru>
Cc:        Eugene Grosbein <eu@grosbein.pp.ru>, bug-followup@freebsd.org, stable@freebsd.org
Subject:   Re: bin/40177: /bin/sh with builtin 'test' has memory leaks
Message-ID:  <20020704195724.C17954@grosbein.pp.ru>
In-Reply-To: <20020704143156.S62723-100000@news1.macomnet.ru>; from maxim@macomnet.ru on Thu, Jul 04, 2002 at 02:35:42PM %2B0400
References:  <200207041016.g64AGhEF017182@grosbein.pp.ru> <20020704143156.S62723-100000@news1.macomnet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 04, 2002 at 02:35:42PM +0400, Maxim Konovalov wrote:

> Could you please try a patch below?
> 
> Index: test/test.c
> ===================================================================
> RCS file: /home/ncvs/src/bin/test/test.c,v
> retrieving revision 1.29.2.5
> diff -u -r1.29.2.5 test.c
> --- test/test.c	29 Apr 2002 13:06:02 -0000	1.29.2.5
> +++ test/test.c	4 Jul 2002 10:33:31 -0000
> @@ -240,6 +240,7 @@
>  		syntax(*t_wp, "unexpected operator");
>  	(void)setregid(gid, egid);
>  	(void)setreuid(uid, euid);
> +	free(nargv);
> 
>  	return res;
>  }
> 
> %%%

Yes, it works. Thank you and  Stefan Farfeleder for similar patch,
I tried only this one, though.

Eugene

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020704195724.C17954>