diff options
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); } |