selinux: Return directly after a failed next_entry() in genfs_read()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 14 Jan 2017 15:34:25 +0000 (16:34 +0100)
committerPaul Moore <paul@paul-moore.com>
Thu, 23 Mar 2017 21:45:29 +0000 (17:45 -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 bccc9ac..375e304 100644 (file)
@@ -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++) {