Re: dwc2: Memory leak in dwc2_gadget_init

2018-04-09 Thread Stefan Wahren
Hi Grigor, > Grigor Tovmasyan hat am 9. April 2018 um > 18:42 geschrieben: > > > Hi Stefan, > > On 4/2/2018 12:59 PM, Stefan Wahren wrote: > > Hi Minas, > > > > i noticed that in opposite to all allocations in dwc2_gadget_init() the > > function

Re: dwc2: Memory leak in dwc2_gadget_init

2018-04-09 Thread Grigor Tovmasyan
Hi Stefan, On 4/2/2018 12:59 PM, Stefan Wahren wrote: > Hi Minas, > > i noticed that in opposite to all allocations in dwc2_gadget_init() the > function dwc2_hsotg_ep_alloc_request() uses kzalloc. So in case > usb_add_gadget_udc() would fail, the memory of the USB request would be > leaked: >

dwc2: Memory leak in dwc2_gadget_init

2018-04-02 Thread Stefan Wahren
Hi Minas, i noticed that in opposite to all allocations in dwc2_gadget_init() the function dwc2_hsotg_ep_alloc_request() uses kzalloc. So in case usb_add_gadget_udc() would fail, the memory of the USB request would be leaked: Linux raspberrypi 4.16.0-rc7-next-20180327+ #2 SMP PREEMPT Sat Mar