From owner-freebsd-bugs Thu Jul 4 5:10:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E41B37B400 for ; Thu, 4 Jul 2002 05:10:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E352043E09 for ; Thu, 4 Jul 2002 05:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g64CA4JU035758 for ; Thu, 4 Jul 2002 05:10:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g64CA4Cd035753; Thu, 4 Jul 2002 05:10:04 -0700 (PDT) Date: Thu, 4 Jul 2002 05:10:04 -0700 (PDT) Message-Id: <200207041210.g64CA4Cd035753@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Eugene Grosbein Subject: Re: bin/40177: /bin/sh with builtin 'test' has memory leaks Reply-To: Eugene Grosbein Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/40177; it has been noted by GNATS. 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 Date: Thu, 4 Jul 2002 19:57:24 +0800 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-bugs" in the body of the message