Thanks Alan!  I'll queue this up for Greg shortly.

Sarah Sharp

On Thu, Jan 17, 2013 at 10:32:16AM -0500, Alan Stern wrote:
> This patch (as1640) fixes a memory leak in xhci-hcd.  The urb_priv
> data structure isn't always deallocated in the handle_tx_event()
> routine for non-control transfers.  The patch adds a kfree() call so
> that all paths end up freeing the memory properly.
> 
> Signed-off-by: Alan Stern <[email protected]>
> Reported-and-tested-by: Martin Mokrejs <[email protected]>
> CC: <[email protected]>
> 
> ---
> 
>  drivers/usb/host/xhci-ring.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: usb-3.7/drivers/usb/host/xhci-ring.c
> ===================================================================
> --- usb-3.7.orig/drivers/usb/host/xhci-ring.c
> +++ usb-3.7/drivers/usb/host/xhci-ring.c
> @@ -2580,6 +2580,8 @@ cleanup:
>                               (trb_comp_code != COMP_STALL &&
>                                       trb_comp_code != COMP_BABBLE))
>                               xhci_urb_free_priv(xhci, urb_priv);
> +                     else
> +                             kfree(urb_priv);
>  
>                       usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), 
> urb);
>                       if ((urb->actual_length != urb->transfer_buffer_length 
> &&
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to