diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-01-15 14:10:09 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-03-29 18:39:17 +0300 |
commit | ebd2b47ba52760e9653456ba19032f79d734a343 (patch) | |
tree | e76695d8e3a9f72888f9700ca4beb4ec8795f26f /security/selinux/ss/policydb.c | |
parent | 7befb7514e5d53026e9fe4a6548f118a65a20a4f (diff) | |
download | linux-ebd2b47ba52760e9653456ba19032f79d734a343.tar.xz |
selinux: Return directly after a failed kzalloc() in roles_init()
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 5ca2d26ecf7f..658247f98dc1 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -178,10 +178,9 @@ static int roles_init(struct policydb *p) int rc; struct role_datum *role; - rc = -ENOMEM; role = kzalloc(sizeof(*role), GFP_KERNEL); if (!role) - goto out; + return -ENOMEM; rc = -EINVAL; role->value = ++p->p_roles.nprim; |