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 17:20:07 +0200 |
commit | 549fe69ee5c7a7f55c34555032961a2265e6e713 (patch) | |
tree | 2652c1314b80ba8f261cf69f26927edda4ea2169 /security/selinux | |
parent | selinux: Return directly after a failed kzalloc() in user_read() (diff) | |
download | linux-549fe69ee5c7a7f55c34555032961a2265e6e713.tar.xz linux-549fe69ee5c7a7f55c34555032961a2265e6e713.zip |
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/selinux')
-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; |