summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorAmeer Hamza <amhamza.mgc@gmail.com>2021-12-06 11:43:15 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-03-07 10:34:52 +0100
commit8403fdd775858a7bf04868d43daea0acbe49ddfc (patch)
tree02958a4cae231023fd204dcdb71adf0a3215d3e7 /drivers/media/usb/em28xx/em28xx-cards.c
parent6a2eb253a33105a8eeed60389a761af968e4ae85 (diff)
downloadlinux-8403fdd775858a7bf04868d43daea0acbe49ddfc.tar.bz2
media: venus: vdec: fixed possible memory leak issue
The venus_helper_alloc_dpb_bufs() implementation allows an early return on an error path when checking the id from ida_alloc_min() which would not release the earlier buffer allocation. Move the direct kfree() from the error checking of dma_alloc_attrs() to the common fail path to ensure that allocations are released on all error paths in this function. Addresses-Coverity: 1494120 ("Resource leak") cc: stable@vger.kernel.org # 5.16+ Fixes: 40d87aafee29 ("media: venus: vdec: decoded picture buffer handling during reconfig sequence") Signed-off-by: Ameer Hamza <amhamza.mgc@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-cards.c')
0 files changed, 0 insertions, 0 deletions