From owner-freebsd-stable Thu Jul 4 5: 8: 2 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C269A37B400; Thu, 4 Jul 2002 05:07:59 -0700 (PDT) Received: from grosbein.pp.ru (www2.svzserv.kemerovo.su [213.184.65.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF20443E31; Thu, 4 Jul 2002 05:07:42 -0700 (PDT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (smmsp@localhost [127.0.0.1]) by grosbein.pp.ru (8.12.5/8.12.2) with ESMTP id g64C2b0Z023922; Thu, 4 Jul 2002 20:03:18 +0800 (KRAST) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.12.5/8.12.3/Submit) id g64BvOwX023889; Thu, 4 Jul 2002 19:57:24 +0800 (KRAST) Date: Thu, 4 Jul 2002 19:57:24 +0800 From: Eugene Grosbein To: Maxim Konovalov Cc: Eugene Grosbein , 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> References: <200207041016.g64AGhEF017182@grosbein.pp.ru> <20020704143156.S62723-100000@news1.macomnet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020704143156.S62723-100000@news1.macomnet.ru>; from maxim@macomnet.ru on Thu, Jul 04, 2002 at 02:35:42PM +0400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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