mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
I lowered the kfree(t) down a couple lines and removed the superflous "t->vdev = NULL;" Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
5b83cfa985
commit
9401608bb3
1 changed files with 1 additions and 2 deletions
|
|
@ -1092,9 +1092,8 @@ static int saa5246a_probe(struct i2c_client *client,
|
|||
/* Register it */
|
||||
err = video_register_device(t->vdev, VFL_TYPE_VTX, -1);
|
||||
if (err < 0) {
|
||||
kfree(t);
|
||||
video_device_release(t->vdev);
|
||||
t->vdev = NULL;
|
||||
kfree(t);
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue