usb: gadget: raw_gadget: fix memory leak on connect event failure
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · hanzhijian
gadget_bind()allocates an ep0 request and stores it indev->req. Ifraw_queue_event()fails to queue the connect event, the function returns without releasing the request, leaking it.
Quoted 7 lines
Quoted 5 lines
Release the request before returning in that case.
Reported-by [email protected]Signed-off-by hanzhijian <[email protected]>Full name please.
Apologies. Please use:
Signed-off-by Zhijian Han <[email protected]>
Best regards,
Zhijian Han
Greg KH
maintainerQuoted 12 lines · Zhijian Han
Quoted 11 lines · Greg Kroah-Hartman
Quoted 9 lines · hanzhijian
gadget_bind()allocates an ep0 request and stores it indev->req. Ifraw_queue_event()fails to queue the connect event, the function returns without releasing the request, leaking it.Release the request before returning in that case.
Reported-by [email protected]Signed-off-by hanzhijian <[email protected]>
Quoted 5 lines
Quoted 1 line
Full name please.
Apologies. Please use:
Signed-off-by Zhijian Han <[email protected]>
Please send a new version with this corrected