mirror of
https://github.com/torvalds/linux.git
synced 2026-09-18 16:48:03 +02:00
snd_ctl_new1() can return NULL when memory allocation fails.
snd_ymfpci_create_spdif_controls() does not check the return value
before dereferencing kctl->id.device, which can lead to a NULL pointer
dereference.
Add NULL checks after snd_ctl_new1() calls and return -ENOMEM if any
fails.
Assisted-by: Opencode:DeepSeek-V4-Flash
Cc: stable@vger.kernel.org
Fixes:
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| ymfpci_main.c | ||
| ymfpci.c | ||
| ymfpci.h | ||