main: fix possible NULL ptr on startup
This commit is contained in:
parent
efd2c28b89
commit
74c9b4ecb1
1 changed files with 1 additions and 1 deletions
|
@ -514,7 +514,7 @@ main(int argc, char **argv)
|
|||
gid_t gid;
|
||||
uid_t uid;
|
||||
struct group *grp = getgrnam(opt_group ?: "video");
|
||||
struct passwd *pw = getpwnam(opt_user) ?: NULL;
|
||||
struct passwd *pw = opt_user ? getpwnam(opt_user) : NULL;
|
||||
FILE *pidfile = fopen(opt_pidpath, "w+");
|
||||
|
||||
if(grp != NULL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue