Re: [PATCH] usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-05-15 Thread Minas Harutyunyan
On 4/16/2018 2:16 PM, Grigor Tovmasyan wrote: > In dwc2_gadget_init() we allocate EP0 request via > dwc2_hsotg_ep_alloc_request(). After that there are > usb_add_gadget_udc() call and if it failed, then > ctrl_req will not be freed and will cause memory leak. > > Reordered function calls in

Re: [PATCH] usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-04-23 Thread Stefan Wahren
Am 23.04.2018 um 09:05 schrieb Grigor Tovmasyan: Hi Stefan, On 4/18/2018 1:11 AM, Stefan Wahren wrote: Hi Grigor, Grigor Tovmasyan hat am 16. April 2018 um 12:16 geschrieben: In dwc2_gadget_init() we allocate EP0 request via dwc2_hsotg_ep_alloc_request().

Re: [PATCH] usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-04-23 Thread Grigor Tovmasyan
Hi Stefan, On 4/18/2018 1:11 AM, Stefan Wahren wrote: > Hi Grigor, > >> Grigor Tovmasyan hat am 16. April 2018 um >> 12:16 geschrieben: >> >> >> In dwc2_gadget_init() we allocate EP0 request via >> dwc2_hsotg_ep_alloc_request(). After that there are >>

Re: [PATCH] usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-04-17 Thread Stefan Wahren
Hi Grigor, > Grigor Tovmasyan hat am 16. April 2018 um > 12:16 geschrieben: > > > In dwc2_gadget_init() we allocate EP0 request via > dwc2_hsotg_ep_alloc_request(). After that there are > usb_add_gadget_udc() call and if it failed, then > ctrl_req will not be