OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c67071
)
[ALSA] usb: usbmixer error path fix
author
Mariusz Kozlowski
<m.kozlowski@tuxland.pl>
Mon, 8 Jan 2007 10:25:30 +0000
(11:25 +0100)
committer
Jaroslav Kysela
<perex@suse.cz>
Tue, 9 Jan 2007 08:06:19 +0000
(09:06 +0100)
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>
sound/usb/usbmixer.c
patch
|
blob
|
history
diff --git
a/sound/usb/usbmixer.c
b/sound/usb/usbmixer.c
index
e74eb1b
..
7b3bf35
100644
(file)
--- a/
sound/usb/usbmixer.c
+++ b/
sound/usb/usbmixer.c
@@
-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);