diff options
author | Eric Andersen | 2003-01-14 06:40:11 +0000 |
---|---|---|
committer | Eric Andersen | 2003-01-14 06:40:11 +0000 |
commit | 4b525addb89d9e66b65e0a54ef7c15b677a74758 (patch) | |
tree | 83ef3b1d22ecac64c9566d3dcce1aa393cc53b7e /shell | |
parent | 65ddf77fbd0f1ec832f062cf05a15bbd2cf1080e (diff) | |
download | busybox-4b525addb89d9e66b65e0a54ef7c15b677a74758.zip busybox-4b525addb89d9e66b65e0a54ef7c15b677a74758.tar.gz |
Only call free if it is necessary
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 01a02d3..828a888 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); } |