[PATCH] drivers: usb: host: fix prevent memory leak in interrupt message submission
Anton Moryakov
ant.v.moryakov at gmail.com
Fri May 16 22:04:48 CEST 2025
Hi Fabio,
Thanks for the review. Yes, this is v2 — the issue Tom pointed out
(unreachable `goto` after `return`) was fixed by replacing it with `result
= -EINVAL; goto err;`.
In v3 I’ve now removed the leftover comment. No other functional changes.
Best regards,
Anton
пт, 16 мая 2025 г. в 22:59, Fabio Estevam <festevam at gmail.com>:
> On Fri, May 16, 2025 at 4:43 PM <ant.v.moryakov at gmail.com> wrote:
>
> > @@ -1557,6 +1557,7 @@ static int _ehci_submit_int_msg(struct usb_device
> *dev, unsigned long pipe,
> > debug("got wrong buffer back (%p instead of %p)\n",
> > backbuffer, buffer);
> > result = -EINVAL;
> > + goto err;
>
> Was this supposed to be a v2? The error Tim pointed out is still here.
>
> ret = _ehci_destroy_int_queue(dev, queue);
> > @@ -1565,6 +1566,10 @@ static int _ehci_submit_int_msg(struct usb_device
> *dev, unsigned long pipe,
> >
> > /* everything worked out fine */
> > return result;
> > +
> > +err:
> > + _ehci_destroy_int_queue(dev, queue); // Освобождаем очередь перед
> выходом
>
> Please remove the comment.
>
More information about the U-Boot
mailing list