diff --git a/shell/ash.c b/shell/ash.c index 44ec2eafd..ef4a47afe 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -6532,9 +6532,7 @@ exptilde(char *startp, int flag) home = lookupvar("HOME"); } else { pw = getpwnam(name); - if (pw == NULL) - goto lose; - home = pw->pw_dir; + home = pw ? pw->pw_dir : NULL; } *p = c; if (!home)