Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2001 20:11:25 +0400 (MSD)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        Bob Bishop <rb@gid.co.uk>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/31533: /bin/sh memory leak
Message-ID:  <20011027200858.V91369-100000@news1.macomnet.ru>
In-Reply-To: <200110271550.f9RFo1M56158@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 27 Oct 2001, Bob Bishop wrote:

> The following reply was made to PR bin/31533; it has been noted by GNATS.
>
> From: Bob Bishop <rb@gid.co.uk>
> To: freebsd-gnats-submit@FreeBSD.org, rb@gid.co.uk
> Cc:
> Subject: Re: bin/31533: /bin/sh memory leak
> Date: Sat, 27 Oct 2001 16:39:58 +0100
>
>  Also affects -CURRENT

How about this patch:

Index: cd.c
===================================================================
RCS file: /home/ncvs/src/bin/sh/cd.c,v
retrieving revision 1.20
diff -u -r1.20 cd.c
--- cd.c	29 Nov 1999 19:10:58 -0000	1.20
+++ cd.c	27 Oct 2001 16:07:20 -0000
@@ -238,8 +238,8 @@
 		curdir = NULL;
 		if (getpwd() == NULL)
 			error("getcwd() failed: %s", strerror(errno));
-		setvar("PWD", curdir, VEXPORT | VTEXTFIXED);
-		setvar("OLDPWD", prevdir, VEXPORT | VTEXTFIXED);
+		setvar("PWD", curdir, VEXPORT);
+		setvar("OLDPWD", prevdir, VEXPORT);
 		INTON;
 		return;
 	}
@@ -270,8 +270,8 @@
 		ckfree(prevdir);
 	prevdir = curdir;
 	curdir = savestr(stackblock());
-	setvar("PWD", curdir, VEXPORT | VTEXTFIXED);
-	setvar("OLDPWD", prevdir, VEXPORT | VTEXTFIXED);
+	setvar("PWD", curdir, VEXPORT);
+	setvar("OLDPWD", prevdir, VEXPORT);
 	INTON;
 }

-- 
Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru


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




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