]> git.baikalelectronics.ru Git - kernel.git/commit
media: usb: fix memory leak in af9005_identify_state
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 9 Oct 2019 15:01:47 +0000 (12:01 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 24 Oct 2019 21:31:51 +0000 (18:31 -0300)
commitbcb0f7e617adaefdbc29b9da67392df08d4060a1
treecefd0e1f1c272b96b60e7487b174d88893ab3d12
parentdd0ba58000066cfdf287d28347bbf7df55f5bf38
media: usb: fix memory leak in af9005_identify_state

In af9005_identify_state when returning -EIO the allocated buffer should
be released. Replace the "return -EIO" with assignment into ret and move
deb_info() under a check.

Fixes: 4ac5690776eb ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/dvb-usb/af9005.c