Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fbe3ca571e4b0795b729658e3d76824be54cb18
Commit:     7fbe3ca571e4b0795b729658e3d76824be54cb18
Parent:     8c670714223d58086695d007b76b3e3ead54e4f5
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 8 11:25:30 2007 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 09:06:19 2007 +0100

    [ALSA] usb: usbmixer error path fix
    
    Without the patch below namelist[0] will not be freed in case
    of kmalloc error.
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/usb/usbmixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index e74eb1b..7b3bf35 100644
--- 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to