From: Dinghao Liu Date: Fri, 21 Aug 2020 05:49:16 +0000 (+0200) Subject: media: atomisp: fix memleak in ia_css_stream_create X-Git-Tag: v5.15~2723^2~335 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1bca5b5ced0cbd779d56f60cdbc9f5e6f6449fe;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Mauro Carvalho Chehab --- 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++)