aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-01-08 05:25:30 -0500
committerJaroslav Kysela <perex@suse.cz>2007-01-09 03:06:19 -0500
commit7fbe3ca571e4b0795b729658e3d76824be54cb18 (patch)
tree41cf61f75f283c770c996a5de3d51d49fe555550 /sound
parent8c670714223d58086695d007b76b3e3ead54e4f5 (diff)
[ALSA] usb: usbmixer error path fix
Without the patch below namelist[0] will not be freed in case of kmalloc error. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbmixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index e74eb1bc8d87..7b3bf3545a3b 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -1526,7 +1526,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
1526 namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL); 1526 namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL);
1527 if (! namelist[i]) { 1527 if (! namelist[i]) {
1528 snd_printk(KERN_ERR "cannot malloc\n"); 1528 snd_printk(KERN_ERR "cannot malloc\n");
1529 while (--i > 0) 1529 while (i--)
1530 kfree(namelist[i]); 1530 kfree(namelist[i]);
1531 kfree(namelist); 1531 kfree(namelist);
1532 kfree(cval); 1532 kfree(cval);