提交 01faa0d9 编写于 作者: S Santosh Kumar Singh 提交者: Mauro Carvalho Chehab

[media] pvrusb2: Clean up file handle in open() error path

Fix to avoid possible exit file handle in error paths.
Signed-off-by: NSantosh Kumar Singh <kumar.san1093@gmail.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 c5b81fe3
......@@ -1050,7 +1050,7 @@ static int pvr2_v4l2_open(struct file *file)
pvr2_trace(PVR2_TRACE_STRUCT,
"Destroying pvr_v4l2_fh id=%p (input mask error)",
fhp);
v4l2_fh_exit(&fhp->fh);
kfree(fhp);
return ret;
}
......@@ -1067,6 +1067,7 @@ static int pvr2_v4l2_open(struct file *file)
pvr2_trace(PVR2_TRACE_STRUCT,
"Destroying pvr_v4l2_fh id=%p (input map failure)",
fhp);
v4l2_fh_exit(&fhp->fh);
kfree(fhp);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册