projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cb5e9e
)
usb: gadget: udc-core: prevent a memory leak
author
Felipe Balbi
<balbi@ti.com>
Tue, 2 Apr 2013 14:06:28 +0000
(17:06 +0300)
committer
Felipe Balbi
<balbi@ti.com>
Tue, 2 Apr 2013 14:07:06 +0000
(17:07 +0300)
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>
drivers/usb/gadget/udc-core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/udc-core.c
b/drivers/usb/gadget/udc-core.c
index 7999cc656979a5f8a7bab69368a3c8f09b950b5b..c6c2b5611b4308ae296b55f6f746a04d107737af 100644
(file)
--- a/
drivers/usb/gadget/udc-core.c
+++ b/
drivers/usb/gadget/udc-core.c
@@
-240,6
+240,7
@@
err3:
err2:
put_device(&gadget->dev);
+ kfree(udc);
err1:
return ret;