diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-01-14 22:15:54 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-03-29 11:20:07 -0400 |
commit | 549fe69ee5c7a7f55c34555032961a2265e6e713 (patch) | |
tree | 2652c1314b80ba8f261cf69f26927edda4ea2169 /security | |
parent | 4bd9f07b89f1a300f96b4863c3a8a4ec36991930 (diff) | |
download | linux-549fe69ee5c7a7f55c34555032961a2265e6e713.tar.bz2 |
selinux: Return directly after a failed kzalloc() in type_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')
-rw-r--r-- | security/selinux/ss/policydb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 9a90953974b8..fd58de5a83ad 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1469,10 +1469,9 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp) __le32 buf[4]; u32 len; - rc = -ENOMEM; typdatum = kzalloc(sizeof(*typdatum), GFP_KERNEL); if (!typdatum) - goto bad; + return -ENOMEM; if (p->policyvers >= POLICYDB_VERSION_BOUNDARY) to_read = 4; |