projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46f2cc8
)
ALSA: 6fire: Don't leak firmware in error path
author
Jesper Juhl
<jj@chaosbits.net>
Mon, 30 May 2011 10:49:01 +0000
(12:49 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 2 Jun 2011 17:56:31 +0000
(19:56 +0200)
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>
sound/usb/6fire/firmware.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/usb/6fire/firmware.c
b/sound/usb/6fire/firmware.c
index d47beffedb0ff5b4be36bab35a1014e5bd5aa22f..a91719d5918b69c6e76e577364c59f892f5768bd 100644
(file)
--- a/
sound/usb/6fire/firmware.c
+++ b/
sound/usb/6fire/firmware.c
@@
-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;