diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-01-14 21:52:55 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-03-29 10:51:09 -0400 |
commit | b5921191005d050d55cf4f3b10f60110f7ed2c24 (patch) | |
tree | 4871a42b7cfd14c30f81c79ed526c7d949db8ffe | |
parent | 3c354d7d7bd5e788c3d94969e4a85648d29d9d12 (diff) | |
download | op-kernel-dev-b5921191005d050d55cf4f3b10f60110f7ed2c24.zip op-kernel-dev-b5921191005d050d55cf4f3b10f60110f7ed2c24.tar.gz |
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>
-rw-r--r-- | security/selinux/ss/policydb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index aa1ce7c..4759c22 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; |