summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-04-14 15:51:30 -0700
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-14 15:51:30 -0700
commit57c7a88fdcaf872957f6390c267ad5d1f43d4862 (patch)
treea2f25a6c9d6eedccc621df83f9edef9e60c0d72a /linux
parent138c81cd1bac037cd7a973fa84e915e0c3ecc59a (diff)
downloadmediapointer-dvb-s2-57c7a88fdcaf872957f6390c267ad5d1f43d4862.tar.gz
mediapointer-dvb-s2-57c7a88fdcaf872957f6390c267ad5d1f43d4862.tar.bz2
drivers/media/video/saa5246a.c: fix use-after-free
From: Dan Carpenter <error27@gmail.com> 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>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/saa5246a.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c
index a5e9a8c2e..1b19a72cc 100644
--- a/linux/drivers/media/video/saa5246a.c
+++ b/linux/drivers/media/video/saa5246a.c
@@ -1098,9 +1098,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;