Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad0d1a05 authored by Felipe F. Tonello's avatar Felipe F. Tonello Committed by Felipe Balbi
Browse files

usb: gadget: f_midi: fix leak on failed to enqueue out requests



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: default avatarFelipe F. Tonello <eu@felipetonello.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e9ca7e4b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -370,6 +370,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);
		}
	}