USB gadget - when to free request->buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I explored gadget zero as an example, my focus is on struct usb_request and its
buffer. I saw it is allocated in the set_config function (inside set_alt), and
the "kfree(req->buf)" and "usb_ep_free_request(ep, req)" is only called in the
complete routine. I know when the device is disconnected these free routines
will be invoked, but how about changing configuration? the set_config(...)
routine in composite.c only disables the ep, but not free the requests and their
buffers. So that's my question, is this a possible memory leak? 

Thanks

Brian



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux