mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
[media] pvrusb2: Clean up file handle in open() error path
Fix to avoid possible 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>
This commit is contained in:
parent
c5b81fe36c
commit
01faa0d9c7
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue