Browse Source

[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 <kumar.san1093@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Santosh Kumar Singh 8 years ago
parent
commit
2217a1d1cb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/media/pci/zoran/zoran_driver.c

+ 1 - 0
drivers/media/pci/zoran/zoran_driver.c

@@ -971,6 +971,7 @@ static int zoran_open(struct file *file)
 	return 0;
 	return 0;
 
 
 fail_fh:
 fail_fh:
+	v4l2_fh_exit(&fh->fh);
 	kfree(fh);
 	kfree(fh);
 fail_unlock:
 fail_unlock:
 	mutex_unlock(&zr->lock);
 	mutex_unlock(&zr->lock);