Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=004b4f2d4448cff7f13871c05d744b00a7c74d4a
Commit:     004b4f2d4448cff7f13871c05d744b00a7c74d4a
Parent:     9e3b1d8e3d5d135ac7be43f6710b7a67b569c292
Author:     Oliver Neukum <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 22 14:24:56 2008 +0100
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:35:04 2008 -0800

    USB: fix memleak in ark3116 serial driver
    
    in an error case memory already allocated must be freed again.
    
    Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/ark3116.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index ddfee91..fe2bfd6 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -151,8 +151,10 @@ static int ark3116_attach(struct usb_serial *serial)
        return 0;
 
 cleanup:
-       for (--i; i >= 0; --i)
+       for (--i; i >= 0; --i) {
+               kfree(usb_get_serial_port_data(serial->port[i]));
                usb_set_serial_port_data(serial->port[i], NULL);
+       }
        return -ENOMEM;
 }
 
-
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