Check strdup return value

This commit is contained in:
matthieu 2016-11-06 10:21:29 +00:00
parent 5f2163b431
commit 6ba2835960

View File

@ -218,6 +218,8 @@ autoLoginEnv(struct display *d, struct verify_info *verify,
return 0;
greet->name = strdup(d->autoLogin);
if (greet->name == NULL)
return 0;
verify->uid = p->pw_uid;
verify->gid = p->pw_gid;
home = p->pw_dir;