From: Eric Andersen Date: Tue, 14 Jan 2003 06:40:11 +0000 (-0000) Subject: Only call free if it is necessary X-Git-Tag: 1_00_pre1~240 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b525addb89d9e66b65e0a54ef7c15b677a74758;p=oweals%2Fbusybox.git Only call free if it is necessary --- diff --git a/shell/ash.c b/shell/ash.c index 01a02d375..828a88872 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -1830,7 +1830,8 @@ static void setpwd(const char *val, int setold) getpwd(); else curdir = simplify_path(val); - free(cated); + if (cated) + free(cated); INTON; setvar("PWD", curdir, VEXPORT); }