linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] usb: xhci: Fix memory leak in xhci_endpoint_reset()
       [not found] <1531120365-44810-1-git-send-email-iq_132@sina.com>
@ 2018-07-20  8:17 ` Mathias Nyman
  0 siblings, 0 replies; only message in thread
From: Mathias Nyman @ 2018-07-20  8:17 UTC (permalink / raw)
  To: iq_132, gregkh; +Cc: linux-usb, linux-kernel, Zheng Xiaowei

On 09.07.2018 10:12, iq_132@sina.com wrote:
> 
> From: Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
> 
> If td_list is not empty the cfg_cmd will not be freed,
> call xhci_free_command to free it.
> 
> Signed-off-by: Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
> ---
>   drivers/usb/host/xhci.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 2f4850f..68e6132 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -3051,6 +3051,7 @@ static void xhci_endpoint_reset(struct usb_hcd *hcd,
>   	if (!list_empty(&ep->ring->td_list)) {
>   		dev_err(&udev->dev, "EP not empty, refuse reset\n");
>   		spin_unlock_irqrestore(&xhci->lock, flags);
> +		xhci_free_command(xhci, cfg_cmd);
>   		goto cleanup;
>   	}
>   	xhci_queue_stop_endpoint(xhci, stop_cmd, udev->slot_id, ep_index, 0);
> 

Thanks, adding to queue

-Mathias

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-20  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1531120365-44810-1-git-send-email-iq_132@sina.com>
2018-07-20  8:17 ` [PATCH] usb: xhci: Fix memory leak in xhci_endpoint_reset() Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).