Skip to content

Commit

Permalink
V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
Browse files Browse the repository at this point in the history
I lowered the kfree(t) down a couple lines and removed the superflous
"t->vdev = NULL;"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
error27 authored and Mauro Carvalho Chehab committed Apr 29, 2009
1 parent 5b83cfa commit 9401608
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/video/saa5246a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9401608

Please sign in to comment.