summaryrefslogtreecommitdiff
path: root/security/landlock/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/landlock/object.c')
-rw-r--r--security/landlock/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/landlock/object.c b/security/landlock/object.c
index 1f50612f0185..0d6e159ef8b5 100644
--- a/security/landlock/object.c
+++ b/security/landlock/object.c
@@ -25,7 +25,7 @@ landlock_create_object(const struct landlock_object_underops *const underops,
if (WARN_ON_ONCE(!underops || !underobj))
return ERR_PTR(-ENOENT);
- new_object = kzalloc(sizeof(*new_object), GFP_KERNEL_ACCOUNT);
+ new_object = kzalloc_obj(*new_object, GFP_KERNEL_ACCOUNT);
if (!new_object)
return ERR_PTR(-ENOMEM);
refcount_set(&new_object->usage, 1);