linux/drivers/media
Colin Ian King 4b06506055 media: uvcvideo: Fix memory leak of object map on error exit path
Currently when the allocation of map->name fails the error exit path
does not kfree the previously allocated object map. Fix this by
setting ret to -ENOMEM and taking the free_map exit error path to
ensure map is kfree'd.

Addresses-Coverity: ("Resource leak")

Fixes: 70fa906d6f ("media: uvcvideo: Use control names from framework")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-12-07 11:29:53 +01:00
..
cec Linux 5.16-rc4 2021-12-07 11:29:41 +01:00
common Linux 5.16-rc4 2021-12-07 11:29:41 +01:00
dvb-core media: dvb-core: dvb_frontend: address some clang warnings 2021-11-29 10:15:04 +01:00
dvb-frontends media: si21xx: report eventual errors at set_frontend 2021-11-29 13:23:14 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-09-30 10:07:54 +02:00
i2c Linux 5.16-rc4 2021-12-07 11:29:41 +01:00
mc media: mc: drop an unused debug function 2021-11-29 10:15:04 +01:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: ipu3-cio2: Add INT347A to cio2-bridge 2021-11-30 10:59:06 +01:00
platform media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()' 2021-11-30 12:31:18 +01:00
radio media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() 2021-11-30 12:00:53 +01:00
rc media: redrat3: fix control-message timeouts 2021-11-19 06:04:16 +00:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-09-30 10:07:40 +02:00
test-drivers media: vidtv: move kfree(dvb) to vidtv_bridge_dev_release() 2021-10-19 08:08:19 +01:00
tuners media: mxl5005s: drop some dead code 2021-11-29 13:23:25 +01:00
usb media: uvcvideo: Fix memory leak of object map on error exit path 2021-12-07 11:29:53 +01:00
v4l2-core Linux 5.16-rc4 2021-12-07 11:29:41 +01:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2021-11-15 08:12:06 +00:00
Makefile