[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:
Родитель
8c67071422
Коммит
7fbe3ca571
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче