summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-01-14 19:35:59 +0100
committerPaul Moore <paul@paul-moore.com>2017-03-23 23:11:33 +0100
commit57152a5be08e240654993984a0f6e54254882626 (patch)
tree43ac0ae51d2f2a5320ab98914f03abc636046ed8
parentselinux: Delete an unnecessary variable assignment in filename_trans_read() (diff)
downloadlinux-57152a5be08e240654993984a0f6e54254882626.tar.xz
linux-57152a5be08e240654993984a0f6e54254882626.zip
selinux: Return directly after a failed next_entry() in range_read()
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>
-rw-r--r--security/selinux/ss/policydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 7131251be628..6c093018ae8d 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -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++) {