From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Jianglei Nie <niejianglei2021@163.com>,
mathias.nyman@intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
Date: Thu, 30 Jun 2022 13:09:42 +0300 [thread overview]
Message-ID: <c676e655-bdc8-5930-7516-86be21ae7320@linux.intel.com> (raw)
In-Reply-To: <bcf4d8db-317f-f0c9-0e9e-5edf25e0c7e8@linux.intel.com>
>
> 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
next prev parent reply other threads:[~2022-06-30 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 1:10 [PATCH] usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info() Jianglei Nie
2022-06-30 6:48 ` Greg KH
2022-06-30 9:57 ` Mathias Nyman
2022-06-30 10:09 ` Mathias Nyman [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-07 7:48 Jianglei Nie
2022-09-07 11:42 ` Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c676e655-bdc8-5930-7516-86be21ae7320@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=niejianglei2021@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox