Re: [PATCH] firewire: test: Fix potential null dereference in firewire kunit test

Takashi Sakamoto <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.firewire.devel
Message-ID <[email protected]>
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 <[email protected]>
> ---
>  drivers/firewire/device-attribute-test.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied to for-next branch.


Thanks

Takashi Sakamoto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.