]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: pxa: fix null-pointer dereference in filter()
authorZeng Heng <zengheng4@huawei.com>
Mon, 14 Nov 2022 08:56:29 +0000 (16:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:03 +0000 (11:41 +0100)
commit1a167a80274a88134822e558a872c2ba8473eca0
treeb82c9333017167a705238b72beb528deb21d7b06
parent7984adb3927856bce4d6f92b988ad09bba64bca6
ASoC: pxa: fix null-pointer dereference in filter()

[ Upstream commit ec7bf231aaa1bdbcb69d23bc50c753c80fb22429 ]

kasprintf() would return NULL pointer when kmalloc() fail to allocate.
Need to check the return pointer before calling strcmp().

Fixes: 653e35f4cc7f ("ASoC: mmp: add audio dma support")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Link: https://lore.kernel.org/r/20221114085629.1910435-1-zengheng4@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/pxa/mmp-pcm.c