aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa5249.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-29 21:25:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-29 21:25:39 -0700
commit93acda847f42aa3ca6d0107845fd59a6041b13e2 (patch)
treebb3dc8650cee8bd49a5a0150af77949bc3d02353 /drivers/media/video/saa5249.c
parent3dacbdad2401c06b97d8d754974233a70c165536 (diff)
parentfe78a49c8ae009d33d6e2c80d4f7f2634440d523 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect. V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM V4L/DVB (11570): patch: s2255drv: fix race condition on set mode V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error V4L/DVB (11561a): move media after i2c V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak V4L/DVB (11494a): cx231xx Kconfig fixes V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
Diffstat (limited to 'drivers/media/video/saa5249.c')
-rw-r--r--drivers/media/video/saa5249.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index 48b27fe4808..271d6e931b7 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -598,6 +598,7 @@ static int saa5249_probe(struct i2c_client *client,
/* Now create a video4linux device */
t->vdev = video_device_alloc();
if (t->vdev == NULL) {
+ kfree(t);
kfree(client);
return -ENOMEM;
}
@@ -617,9 +618,8 @@ static int saa5249_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;