mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] zoran: Clean up file handle in open() error path.
@ 2016-12-19 16:47 Santosh Kumar Singh
  0 siblings, 0 replies; only message in thread
From: Santosh Kumar Singh @ 2016-12-19 16:47 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, mjpeg-users
  Cc: linux-media, linux-kernel, Santosh Kumar Singh

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

Signed-off-by: Santosh Kumar Singh <kumar.san1093@gmail.com>
---
 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 d6b631a..13e17a4 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
+++ b/drivers/media/pci/zoran/zoran_driver.c
@@ -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);
-- 
1.9.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-19 16:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 16:47 [PATCH] zoran: Clean up file handle in open() error path Santosh Kumar Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®