WSL2-Linux-Kernel/drivers/media/test-drivers
Jiasheng Jiang 9dd2fd7a1f media: vidtv: Check for null return of vzalloc
[ Upstream commit e6a21a1410 ]

As the possible failure of the vzalloc(), e->encoder_buf might be NULL.
Therefore, it should be better to check it in order
to guarantee the success of the initialization.
If fails, we need to free not only 'e' but also 'e->name'.
Also, if the allocation for ctx fails, we need to free 'e->encoder_buf'
else.

Fixes: f90cf6079b ("media: vidtv: add a bridge driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:20 +02:00
..
vicodec media: vicodec: Do not zero reserved fields 2021-01-27 13:21:44 +01:00
vidtv media: vidtv: Check for null return of vzalloc 2022-04-08 14:23:20 +02:00
vimc media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
vivid media: vivid: increase max number of allowed 2021-07-12 09:16:36 +02:00
Kconfig media: media/test-drivers/Kconfig: fix broken Kconfig 2020-09-12 10:21:01 +02:00
Makefile media: vidtv: implement a tuner driver 2020-09-12 09:42:16 +02:00
vim2m.c media: media/test_drivers: Drop unnecessary NULL check after container_of 2021-06-02 13:31:13 +02:00