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

Commit 1f7a8f32 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_midi: Fix use after free bug"

parents 083bcc38 1d0ede93
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1139,6 +1139,7 @@ static void f_midi_free(struct usb_function *f)
	mutex_lock(&opts->lock);
	for (i = opts->in_ports - 1; i >= 0; --i)
		kfree(midi->in_port[i]);
	opts->func_inst.f = NULL;
	kfree(midi);
	--opts->refcnt;
	mutex_unlock(&opts->lock);