Commit 352fafe9 authored by Charles Han's avatar Charles Han Committed by Takashi Sakamoto
Browse files

firewire: test: Fix potential null dereference in firewire kunit test



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: 1c8506d6 ("firewire: test: add test of device attributes for simple AV/C device")
Signed-off-by: default avatarCharles Han <hanchunchao@inspur.com>
Link: https://lore.kernel.org/r/20250110084237.8877-1-hanchunchao@inspur.com


Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
parent 892bb074
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment