Re: [PATCH] firewire: test: Fix potential null dereference in firewire kunit test
From: Takashi Sakamoto
Date: Sun Jan 12 2025 - 20:43:13 EST
Hi,
On Fri, Jan 10, 2025 at 04:42:37PM +0800, Charles Han wrote:
> kunit_kzalloc() may return a NULL pointer, dereferencing it without
> NULL check may lead to NULL dereference.
> Add a NULL check for test_state.
>
> Fixes: 1c8506d62624 ("firewire: test: add test of device attributes for simple AV/C device")
> Signed-off-by: Charles Han <hanchunchao@xxxxxxxxxx>
> ---
> drivers/firewire/device-attribute-test.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied to for-next branch.
Thanks
Takashi Sakamoto