Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4edf2c83637b9e9db771cc5629de036fe4488564
Commit:     4edf2c83637b9e9db771cc5629de036fe4488564
Parent:     868e440d2f2b55f790d106100a46034b6aa12577
Author:     Oliver Neukum <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 26 18:12:44 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:38 2007 -0700

    USB: fix ark3116 memory leak
    
    this driver has a memory leak in an error case.
    
    Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/ark3116.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index edd6857..ea2175b 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -341,7 +341,7 @@ static int ark3116_open(struct usb_serial_port *port, 
struct file *filp)
 
        result = usb_serial_generic_open(port, filp);
        if (result)
-               return result;
+               goto err_out;
 
        /* open */
        ARK3116_RCV(serial, 111, 0xFE, 0xC0, 0x0000, 0x0003, 0x02, buf);
@@ -372,6 +372,7 @@ static int ark3116_open(struct usb_serial_port *port, 
struct file *filp)
        if (port->tty)
                ark3116_set_termios(port, &tmp_termios);
 
+err_out:
        kfree(buf);
 
        return result;
-
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