提交 d39e74fd 编写于 作者: S Shailendra Verma 提交者: Mauro Carvalho Chehab

[media] Staging: media: platform: davinci: - Fix for memory leak

Fix to avoid possible memory leak if the decoder initialization got failed.
Free the allocated memory for file handle object before return in case
decoder initialization fails.
Signed-off-by: NShailendra Verma <shailendra.v@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 30f895a9
......@@ -519,6 +519,8 @@ static int vpfe_open(struct file *file)
if (!vpfe_dev->initialized) {
if (vpfe_initialize_device(vpfe_dev)) {
mutex_unlock(&vpfe_dev->lock);
v4l2_fh_exit(&fh->fh);
kfree(fh);
return -ENODEV;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册