]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: fix memleak in ia_css_stream_create
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Fri, 21 Aug 2020 05:49:16 +0000 (07:49 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 3 Sep 2020 09:01:56 +0000 (11:01 +0200)
commitb6031a48c0ff27a2be75bbc56b0df26c2fa4bbe6
tree8cb2a0c7cdc45e3909902e5d683a71d4d2a3b5b1
parenteaa56b8ee9210d40f86dbac47c5d07d00bbd9a6e
media: atomisp: fix memleak in ia_css_stream_create

When aspect_ratio_crop_init() fails, curr_stream needs
to be freed just like what we've done in the following
error paths. However, current code is returning directly
and ends up leaking memory.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/sh_css.c