Skip to content

Commit

Permalink
ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Juhl authored and Takashi Iwai committed Jun 14, 2011
1 parent 2308f4a commit 37f7ec3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sound/usb/6fire/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ static int usb6fire_fw_ezusb_upload(
data = 0x00; /* resume ezusb cpu */
ret = usb6fire_fw_ezusb_write(device, 0xa0, 0xe600, &data, 1);
if (ret < 0) {
release_firmware(fw);
snd_printk(KERN_ERR PREFIX "unable to upload ezusb "
"firmware %s: end message.\n", fwname);
return ret;
Expand Down

0 comments on commit 37f7ec3

Please sign in to comment.