wall: make sure with not referencing a null pointer
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
2e2cfdae79
commit
b4cb2b48f9
|
@ -147,6 +147,9 @@ static int is_gr_member(const char *login, const struct group_workspace *buf)
|
|||
int rc;
|
||||
|
||||
pw = getpwnam(login);
|
||||
if (!pw)
|
||||
return 0;
|
||||
|
||||
if (buf->requested_group == pw->pw_gid)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue