dect
/
linux-2.6
Archived
13
0
Fork 0

[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>
This commit is contained in:
Mariusz Kozlowski 2007-01-08 11:25:30 +01:00 committed by Jaroslav Kysela
parent 8c67071422
commit 7fbe3ca571
1 changed files with 1 additions and 1 deletions

View File

@ -1526,7 +1526,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL);
if (! namelist[i]) {
snd_printk(KERN_ERR "cannot malloc\n");
while (--i > 0)
while (i--)
kfree(namelist[i]);
kfree(namelist);
kfree(cval);