projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7befb75
)
selinux: Return directly after a failed kzalloc() in roles_init()
author
Markus Elfring
<elfring@users.sourceforge.net>
Sun, 15 Jan 2017 11:10:09 +0000
(12:10 +0100)
committer
Paul Moore
<paul@paul-moore.com>
Wed, 29 Mar 2017 15:39:17 +0000
(11:39 -0400)
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>
security/selinux/ss/policydb.c
patch
|
blob
|
history
diff --git
a/security/selinux/ss/policydb.c
b/security/selinux/ss/policydb.c
index 5ca2d26ecf7fe4df31832b20d2525adf6d393ec9..658247f98dc13671d747d97b0e55087d3b1e8402 100644
(file)
--- 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;