[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562EA7E2.6010403@hackerion.com>
Date: Mon, 26 Oct 2015 23:23:30 +0100
From: Robert Baldyga <r.baldyga@...kerion.com>
To: "Felipe F. Tonello" <eu@...ipetonello.com>,
linux-usb@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
Clemens Ladisch <clemens@...isch.de>
Subject: Re: [PATCH v4 4/7] usb: gadget: f_midi: fix leak on failed to enqueue
out requests
On 10/26/2015 05:55 PM, Felipe F. Tonello wrote:
> This patch fixes a memory leak that occurs when an endpoint fails to enqueue
> the request. If that happens the complete function will never be called, thus
> never freeing the request.
>
> Signed-off-by: Felipe F. Tonello <eu@...ipetonello.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
> index 4c01c8a..0e9cdeb 100644
> --- a/drivers/usb/gadget/function/f_midi.c
> +++ b/drivers/usb/gadget/function/f_midi.c
> @@ -344,6 +344,7 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
> if (err) {
> ERROR(midi, "%s queue req: %d\n",
> midi->out_ep->name, err);
> + free_ep_req(midi->out_ep, req);
> }
> }
>
>
Don't we have similar problem in f_midi_transmit() and f_midi_complete()
functions?
Best regards,
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists