projects
/
platform
/
upstream
/
kernel-adaptation-pc.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
|
history
diff --git
a/drivers/usb/gadget/udc-core.c
b/drivers/usb/gadget/udc-core.c
index
7999cc6
..
c6c2b56
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;