From 79e02527efb9c08f4c49976f71dd1c06745af74d Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 23 Dec 1996 22:16:35 +0000 Subject: [PATCH] Apply a little dab of bit caulk to keep those beggars from leaking out. Noticed by: bde --- bin/sh/cd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/sh/cd.c b/bin/sh/cd.c index 29f8f6c331bb..caf8972416e3 100644 --- a/bin/sh/cd.c +++ b/bin/sh/cd.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cd.c,v 1.8 1996/12/21 22:09:38 steve Exp $ + * $Id: cd.c,v 1.9 1996/12/23 05:31:48 steve Exp $ */ #ifndef lint @@ -235,11 +235,7 @@ pwdcmd(argc, argv) char * getpwd() { - char *buf; - if (curdir) return (curdir); - if ((buf = getcwd(NULL, 0)) == NULL) - return (NULL); - return ((curdir = savestr(buf))); + return (getcwd(NULL, 0)); }