linux/drivers/media/usb/usbvision
Alexey Khoroshilov 090c65b694 [media] usbvision-video: fix memory leak of alt_max_pkt_size
1. usbvision->alt_max_pkt_size is not deallocated anywhere.
2. if allocation of usbvision->alt_max_pkt_size fails,
there is no proper deallocation of already acquired resources.
The patch adds kfree(usbvision->alt_max_pkt_size) to
usbvision_release() as soon as other deallocations happen there.
It calls usbvision_release() if allocation of
usbvision->alt_max_pkt_size fails as soon as usbvision_release()
is safe to work with incompletely initialized usbvision structure.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21 11:29:24 -03:00
..
Kconfig [media] Kconfig: merge all customise options into just one 2012-08-21 08:05:06 -03:00
Makefile [media] move i2c files into drivers/media/i2c 2012-08-15 16:42:14 -03:00
usbvision-cards.c
usbvision-cards.h
usbvision-core.c [media] v4l: Convert drivers to use monotonic timestamps 2012-12-21 10:56:43 -02:00
usbvision-i2c.c [media] usbvision: Replace memcpy with struct assignment 2012-12-27 18:44:30 -02:00
usbvision-video.c [media] usbvision-video: fix memory leak of alt_max_pkt_size 2013-06-21 11:29:24 -03:00
usbvision.h [media] usbvision-core: fix a warning 2012-10-28 07:38:58 -02:00