From 2217a1d1cb0673daa398a08475e6c493b1dc663f Mon Sep 17 00:00:00 2001 From: Santosh Kumar Singh Date: Mon, 19 Dec 2016 14:47:44 -0200 Subject: [PATCH] [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 --- drivers/media/pci/zoran/zoran_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 617574c..180f3d7 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); -- 2.7.4