mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
3c354d7d7b
commit
b592119100
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue