linux/drivers/media/test-drivers
Jiasheng Jiang a254ee1ddc media: vidtv: mux: Add check and kfree for kstrdup
[ Upstream commit 1fd6eb1264 ]

Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.
Moreover, use kfree() in the later error handling in order to avoid
memory leak.

Fixes: c2f78f0cb2 ("media: vidtv: psi: add a Network Information Table (NIT)")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-11-20 11:52:14 +01:00
..
vicodec media: vicodec: Use vb2_find_buffer 2022-07-17 11:12:43 +01:00
vidtv media: vidtv: mux: Add check and kfree for kstrdup 2023-11-20 11:52:14 +01:00
vimc media: vimc: Fix wrong function called when vimc_init() fails 2022-12-31 13:32:16 +01:00
vivid media: vivid: fix compose size exceed boundary 2022-12-31 13:32:08 +01:00
Kconfig media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: sort entries where it fits 2022-03-14 09:42:59 +01:00
vim2m.c media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00