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

Commit 825b6800 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: Fix double free of device descriptor pointers"

parents 7fdfb371 4895b4fd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -198,9 +198,13 @@ EXPORT_SYMBOL_GPL(usb_assign_descriptors);
void usb_free_all_descriptors(struct usb_function *f)
{
	usb_free_descriptors(f->fs_descriptors);
	f->fs_descriptors = NULL;
	usb_free_descriptors(f->hs_descriptors);
	f->hs_descriptors = NULL;
	usb_free_descriptors(f->ss_descriptors);
	f->ss_descriptors = NULL;
	usb_free_descriptors(f->ssp_descriptors);
	f->ssp_descriptors = NULL;
}
EXPORT_SYMBOL_GPL(usb_free_all_descriptors);

+0 −4
Original line number Diff line number Diff line
@@ -3193,10 +3193,6 @@ static void gsi_unbind(struct usb_configuration *c, struct usb_function *f)
		mbim_gsi_ext_config_desc.function.subCompatibleID[0] = 0;

	usb_free_all_descriptors(f);
	f->hs_descriptors = NULL;
	f->fs_descriptors = NULL;
	f->ss_descriptors = NULL;
	f->ssp_descriptors = NULL;

	if (gsi->c_port.notify) {
		kfree(gsi->c_port.notify_req->buf);