summaryrefslogtreecommitdiff
path: root/security/integrity/ima/ima_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/integrity/ima/ima_queue.c')
-rw-r--r--security/integrity/ima/ima_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
index 590637e81ad1..859c83ab5a2b 100644
--- a/security/integrity/ima/ima_queue.c
+++ b/security/integrity/ima/ima_queue.c
@@ -103,7 +103,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry,
struct ima_queue_entry *qe;
unsigned int key;
- qe = kmalloc(sizeof(*qe), GFP_KERNEL);
+ qe = kmalloc_obj(*qe, GFP_KERNEL);
if (qe == NULL) {
pr_err("OUT OF MEMORY ERROR creating queue entry\n");
return -ENOMEM;
@@ -269,8 +269,8 @@ int __init ima_init_digests(void)
if (!ima_tpm_chip)
return 0;
- digests = kcalloc(ima_tpm_chip->nr_allocated_banks, sizeof(*digests),
- GFP_NOFS);
+ digests = kzalloc_objs(*digests, ima_tpm_chip->nr_allocated_banks,
+ GFP_NOFS);
if (!digests)
return -ENOMEM;