diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2011-11-17 23:43:40 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-12-19 11:23:56 +1100 |
commit | 2ff6fa8fafd6fa94029fa0558a6b85956930f1f5 (patch) | |
tree | b9e12bb9ef1a92c68bb459ae82fa4e76629bcfca /security/selinux | |
parent | b8aa09fd880eb4c2881b9f3c8a8d09c0404cd4eb (diff) | |
download | linux-2ff6fa8fafd6fa94029fa0558a6b85956930f1f5.tar.bz2 |
selinux: Casting (void *) value returned by kmalloc is useless
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/ss/conditional.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 2ec904177fe0..377d148e7157 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -175,7 +175,7 @@ void cond_policydb_destroy(struct policydb *p) int cond_init_bool_indexes(struct policydb *p) { kfree(p->bool_val_to_struct); - p->bool_val_to_struct = (struct cond_bool_datum **) + p->bool_val_to_struct = kmalloc(p->p_bools.nprim * sizeof(struct cond_bool_datum *), GFP_KERNEL); if (!p->bool_val_to_struct) return -ENOMEM; |