Skip to contentSkip to conversation

zoran: Clean up file handle in open() error path.

PATCH New Santosh Kumar Singh 1 participant 1 message Dec 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zoran: Clean up file handle in open() error path.

Fix to avoid possible memory leak and exit file handle in error paths.

---
 drivers/media/pci/zoran/zoran_driver.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/zoran/zoran_driver.c +1 -0
index d6b631a..13e17a4 100644
@@ -975,6 +975,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);
Signature · 1 line
1.9.1