tty_audit: use kzalloc() in tty_audit_buf_alloc()
authorJiri Slaby <jirislaby@kernel.org>
Wed, 21 Jun 2023 10:16:07 +0000 (12:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 15:57:29 +0000 (17:57 +0200)
commite1488513abee9f34a7d0f3bd57ee65d2a7e13426
tree10ce5695f07e3312a2497fde9e59b867005a568c
parent777e456852f729fa2942187a43a8eafbaecc6876
tty_audit: use kzalloc() in tty_audit_buf_alloc()

tty_audit_buf_alloc() manually erases most of the entries after
kmalloc(). So use kzalloc() and remove the manual sets to zero.

That way, we are sure that we do not omit anything.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230621101611.10580-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_audit.c