summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-01-14 21:52:55 +0100
committerPaul Moore <paul@paul-moore.com>2017-03-29 10:51:09 -0400
commitb5921191005d050d55cf4f3b10f60110f7ed2c24 (patch)
tree4871a42b7cfd14c30f81c79ed526c7d949db8ffe /security
parent3c354d7d7bd5e788c3d94969e4a85648d29d9d12 (diff)
downloadlinux-b5921191005d050d55cf4f3b10f60110f7ed2c24.tar.bz2
selinux: Improve another size determination in sens_read()
Replace the specification of a data type by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/policydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index aa1ce7ce3524..4759c22d1ae6 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -1611,7 +1611,7 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
goto bad;
rc = -ENOMEM;
- levdatum->level = kmalloc(sizeof(struct mls_level), GFP_ATOMIC);
+ levdatum->level = kmalloc(sizeof(*levdatum->level), GFP_ATOMIC);
if (!levdatum->level)
goto bad;