mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00: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