forked from luck/tmp_suning_uos_patched
ALSA: 6fire: Don't leak firmware in error path
One of the error paths in sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload() neglects to free the memory allocated for the firmware before returning, thus leaking the memory. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
46f2cc8051
commit
bf0be0e951
|
@ -227,6 +227,7 @@ static int usb6fire_fw_ezusb_upload(
|
|||
ret = usb6fire_fw_ihex_init(fw, rec);
|
||||
if (ret < 0) {
|
||||
kfree(rec);
|
||||
release_firmware(fw);
|
||||
snd_printk(KERN_ERR PREFIX "error validating ezusb "
|
||||
"firmware %s.\n", fwname);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue
Block a user