diff options
author | Dan Carpenter <error27@gmail.com> | 2009-04-15 00:51:30 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-29 20:41:12 +0200 |
commit | 9401608bb34be14960311dbb91d4a82ee07a03fa (patch) | |
tree | f5dc37faf89d24b659a659e057d7f8457a4178e6 /drivers/media/video/saa5246a.c | |
parent | V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak (diff) | |
download | linux-9401608bb34be14960311dbb91d4a82ee07a03fa.tar.xz linux-9401608bb34be14960311dbb91d4a82ee07a03fa.zip |
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 <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa5246a.c')
-rw-r--r-- | drivers/media/video/saa5246a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index da47b2f05288..155804b061e9 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c @@ -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; |