summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-08-21 07:49:16 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-03 11:01:56 +0200
commitc1bca5b5ced0cbd779d56f60cdbc9f5e6f6449fe (patch)
tree8cb2a0c7cdc45e3909902e5d683a71d4d2a3b5b1 /drivers
parent5b4b09788dc156d88f54ba0b5fe26d84c03728d4 (diff)
downloadlinux-c1bca5b5ced0cbd779d56f60cdbc9f5e6f6449fe.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 54434c2dbaf9..8473e1437074 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -9521,7 +9521,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
if (err)
{
IA_CSS_LEAVE_ERR(err);
- return err;
+ goto ERR;
}
#endif
for (i = 0; i < num_pipes; i++)