diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-01-15 11:15:19 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-03-29 17:29:11 +0200 |
commit | 442ca4d656645505346017c37ac137cde680bf38 (patch) | |
tree | c6e88aeb2b32fd09fd3b99f367040ac3df00840b /security/selinux/ss | |
parent | selinux: Return directly after a failed kzalloc() in class_read() (diff) | |
download | linux-442ca4d656645505346017c37ac137cde680bf38.tar.xz linux-442ca4d656645505346017c37ac137cde680bf38.zip |
selinux: Return directly after a failed kzalloc() in common_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')
-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 edf173ed05f8..99ee0ee2d92a 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1152,10 +1152,9 @@ static int common_read(struct policydb *p, struct hashtab *h, void *fp) u32 len, nel; int i, rc; - rc = -ENOMEM; comdatum = kzalloc(sizeof(*comdatum), GFP_KERNEL); if (!comdatum) - goto bad; + return -ENOMEM; rc = next_entry(buf, fp, sizeof buf); if (rc) |