]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selinux: Return directly after a failed next_entry() in range_read()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 14 Jan 2017 18:35:59 +0000 (19:35 +0100)
committerPaul Moore <paul@paul-moore.com>
Thu, 23 Mar 2017 22:11:33 +0000 (18:11 -0400)
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>
security/selinux/ss/policydb.c

index 7131251be628730dbc7a8086ec6935e941294dbe..6c093018ae8d1e8b3bfeb12ec0c3738fbb4b4974 100644 (file)
@@ -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++) {