Commit 8bfff486 authored by Zichen Xie's avatar Zichen Xie Committed by Greg Kroah-Hartman
Browse files

ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc()



[ Upstream commit 9ad467a2 ]

kunit_kzalloc() may return a NULL pointer, dereferencing it without
NULL check may lead to NULL dereference.
Add NULL checks for all the kunit_kzalloc() in sound_kunit.c

Fixes: 3e39acf5 ("ALSA: core: Add sound core KUnit test")
Signed-off-by: default avatarZichen Xie <zichenxie0106@gmail.com>
Link: https://patch.msgid.link/20241126192448.12645-1-zichenxie0106@gmail.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 97d28eee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment