[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2026010723-earshot-staining-6e11@gregkh>
Date: Wed, 7 Jan 2026 16:04:43 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Zilin Guan <zilin@....edu.cn>
Cc: mathias.nyman@...el.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, jianhao.xu@....edu.cn
Subject: Re: [PATCH] usb: xhci: Fix memory leak in xchi_disable_slot()
On Thu, Dec 25, 2025 at 04:21:19PM +0000, Zilin Guan wrote:
> xhci_alloc_command() allocates a command structure and, when the
> second argument is true, also allocates a completion structure.
> Currently, the error handling path in xhci_disable_slot() only frees
> the command structure using kfree(), causing the completion structure
> to leak.
>
> Fix this by using xhci_free_command() instead of kfree(). This function
> correctly frees both the command and the completion structure.
>
> Fixes: cd3f1790b006d ("usb: xhci: Fix potential memory leak in xhci_disable_slot()")
No cc: stable?
And how was this found? How was it tested? What tool created this fix?
thanks,
greg k-h
Powered by blists - more mailing lists