diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-04 22:00:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-04 22:00:24 -0300 |
commit | ba28fa4eca1b69daa57024d9c0c9fe880ac0b2c9 (patch) | |
tree | e716ca1527cde8ce8310fb84726cb9e89b1b472a /linux/drivers/media/video | |
parent | 0ffdf3c011bae5197f3e30f633d32645be8df021 (diff) | |
download | mediapointer-dvb-s2-ba28fa4eca1b69daa57024d9c0c9fe880ac0b2c9.tar.gz mediapointer-dvb-s2-ba28fa4eca1b69daa57024d9c0c9fe880ac0b2c9.tar.bz2 |
drivers/media/video/gspca: introduce missing kfree
From: Julia Lawall <julia@diku.dk>
Error handling code following a kmalloc should free the allocated data.
Priority: normal
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c index 7127321ac..6b89f33a4 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c @@ -178,8 +178,10 @@ sensor_found: sens_priv->settings = kmalloc(sizeof(s32)*ARRAY_SIZE(s5k83a_ctrls), GFP_KERNEL); - if (!sens_priv->settings) + if (!sens_priv->settings) { + kfree(sens_priv); return -ENOMEM; + } sd->gspca_dev.cam.cam_mode = s5k83a_modes; sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k83a_modes); |