kernel: Replace kmalloc() usages with kzalloc() (#2939)

This ensures we won't use uninitialized pointers for task work.
This commit is contained in:
Wang Han
2025-11-16 15:17:55 +08:00
committed by ShirkNeko
parent e2bcec1ee2
commit 0d251a2655
7 changed files with 13 additions and 12 deletions

View File

@@ -180,7 +180,7 @@ static void sulog_add_entry(char *log_buf, size_t len, uid_t uid, u8 dedup_type)
if (!dedup_should_print(uid, dedup_type, log_buf, len))
return;
entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
if (!entry)
return;