mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
usb: gadget: udc-core: prevent a memory leak
udc-core would leak 'udc' memory in some error cases. Fix it by kfree()ing udc on error path. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
1cb5e9ee03
commit
c5dbc220b3
@ -240,6 +240,7 @@ err3:
|
||||
|
||||
err2:
|
||||
put_device(&gadget->dev);
|
||||
kfree(udc);
|
||||
|
||||
err1:
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user