[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c676e655-bdc8-5930-7516-86be21ae7320@linux.intel.com>
Date: Thu, 30 Jun 2022 13:09:42 +0300
From: Mathias Nyman <mathias.nyman@...ux.intel.com>
To: Jianglei Nie <niejianglei2021@....com>, mathias.nyman@...el.com,
gregkh@...uxfoundation.org
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: host: xhci: Fix potential memory leak in
xhci_alloc_stream_info()
>
> How about:
>
> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
> index 8c19e151a945..f7cac1af51c5 100644
> --- a/drivers/usb/host/xhci-mem.c
> +++ b/drivers/usb/host/xhci-mem.c
> @@ -641,7 +641,7 @@ struct xhci_stream_info *xhci_alloc_stream_info(struct xhci_hcd *xhci,
> num_stream_ctxs, &stream_info->ctx_array_dma,
> mem_flags);
> if (!stream_info->stream_ctx_array)
> - goto cleanup_ctx;
> + goto cleanup_rings;
Small sidenote, "cleanup_rings" label was already in use, so maybe something like
"cleanup_ring_array" could be used
Thanks
-Mathias
Powered by blists - more mailing lists