summaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-01-14 21:42:02 +0100
committerPaul Moore <paul@paul-moore.com>2017-03-29 15:56:48 +0200
commit3c354d7d7bd5e788c3d94969e4a85648d29d9d12 (patch)
treee868a0dfef9f4c160adb4332957d0f9b5cdea7f9 /security/selinux/ss/policydb.c
parentselinux: Return directly after a failed kzalloc() in cat_read() (diff)
downloadlinux-3c354d7d7bd5e788c3d94969e4a85648d29d9d12.tar.xz
linux-3c354d7d7bd5e788c3d94969e4a85648d29d9d12.zip
selinux: Return directly after a failed kzalloc() in sens_read()
Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r--security/selinux/ss/policydb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 36285d12c2e9..aa1ce7ce3524 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -1595,10 +1595,9 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
__le32 buf[2];
u32 len;
- rc = -ENOMEM;
levdatum = kzalloc(sizeof(*levdatum), GFP_ATOMIC);
if (!levdatum)
- goto bad;
+ return -ENOMEM;
rc = next_entry(buf, fp, sizeof buf);
if (rc)