Skip to content

Commit

Permalink
selinux: Return directly after a failed next_entry() in genfs_read()
Browse files Browse the repository at this point in the history
Return directly after a call of the function "next_entry" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
Markus Elfring authored and Paul Moore committed Mar 23, 2017
1 parent b4e4686 commit 3a0aa56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ static int genfs_read(struct policydb *p, void *fp)

rc = next_entry(buf, fp, sizeof(u32));
if (rc)
goto out;
return rc;
nel = le32_to_cpu(buf[0]);

for (i = 0; i < nel; i++) {
Expand Down

0 comments on commit 3a0aa56

Please sign in to comment.