Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dinghao Liu and committed by
Mauro Carvalho Chehab
c1bca5b5 5b4b0978

+1 -1
+1 -1
drivers/staging/media/atomisp/pci/sh_css.c
··· 9521 9521 if (err) 9522 9522 { 9523 9523 IA_CSS_LEAVE_ERR(err); 9524 - return err; 9524 + goto ERR; 9525 9525 } 9526 9526 #endif 9527 9527 for (i = 0; i < num_pipes; i++)