Skip to content

Commit

Permalink
selinux: Return directly after a failed next_entry() in range_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 02fcef2 commit 57152a5
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 @@ -1852,7 +1852,7 @@ static int range_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 57152a5

Please sign in to comment.