lkml.org 
[lkml]   [2010]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 027/149] USB: kobil: fix memory leak
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Johan Hovold <jhovold@gmail.com>

    commit c0f631d1948658b27349545b2cbcb4b32f010c7a upstream.

    An urb transfer buffer is allocated at every open but was never freed.

    This driver is a bit of a mess...

    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/serial/kobil_sct.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/drivers/usb/serial/kobil_sct.c
    +++ b/drivers/usb/serial/kobil_sct.c
    @@ -345,7 +345,8 @@ static void kobil_close(struct usb_seria

    /* FIXME: Add rts/dtr methods */
    if (port->write_urb) {
    - usb_kill_urb(port->write_urb);
    + usb_poison_urb(port->write_urb);
    + kfree(port->write_urb->transfer_buffer);
    usb_free_urb(port->write_urb);
    port->write_urb = NULL;
    }



    \
     
     \ /
      Last update: 2010-07-01 20:53    [W:0.043 / U:30.424 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site