]> Gentwo Git Trees - linux/.git/commit
audit: Use kzalloc() instead of kmalloc()/memset() in audit_krule_to_data()
authorGongwei Li <ligongwei@kylinos.cn>
Wed, 5 Nov 2025 10:36:19 +0000 (18:36 +0800)
committerPaul Moore <paul@paul-moore.com>
Fri, 7 Nov 2025 21:38:34 +0000 (16:38 -0500)
commit77563f3d4704206c8f6626852365591aa4e0b779
tree5fbb29ba2dd6c4bb36a2bef566ba31d9ef8fe757
parent4f7b54e17eddac93c78151ffc80b8437ab11c90b
audit: Use kzalloc() instead of kmalloc()/memset() in audit_krule_to_data()

Replace kmalloc+memset by kzalloc for better readability and simplicity.

This addresses the warning below:
WARNING: kzalloc should be used for data, instead of kmalloc/memset

Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
[PM: subject and description tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditfilter.c