From: Santosh Kumar Singh Date: Mon, 19 Dec 2016 16:47:44 +0000 (-0200) Subject: [media] zoran: Clean up file handle in open() error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2217a1d1cb0673daa398a08475e6c493b1dc663f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] zoran: Clean up file handle in open() error path Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 617574cd24a6..180f3d7af3e1 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c @@ -971,6 +971,7 @@ static int zoran_open(struct file *file) return 0; fail_fh: + v4l2_fh_exit(&fh->fh); kfree(fh); fail_unlock: mutex_unlock(&zr->lock);