mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()
We have a double-free bug in sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload(). We already call release_firmware(fw) on line 258, so when we then do it again after usb6fire_fw_ezusb_write() returns <0, we have a double-free. Easily fixed by just removing the last call to release_firmware(). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2308f4add3
commit
37f7ec38ea
@ -270,7 +270,6 @@ static int usb6fire_fw_ezusb_upload(
|
|||||||
data = 0x00; /* resume ezusb cpu */
|
data = 0x00; /* resume ezusb cpu */
|
||||||
ret = usb6fire_fw_ezusb_write(device, 0xa0, 0xe600, &data, 1);
|
ret = usb6fire_fw_ezusb_write(device, 0xa0, 0xe600, &data, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
release_firmware(fw);
|
|
||||||
snd_printk(KERN_ERR PREFIX "unable to upload ezusb "
|
snd_printk(KERN_ERR PREFIX "unable to upload ezusb "
|
||||||
"firmware %s: end message.\n", fwname);
|
"firmware %s: end message.\n", fwname);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user