projects
/
GitHub
/
moto-9609
/
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:
c818a94
)
usb: gadget: gadgetfs: fix an oops in ep_write()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 6 Jan 2015 10:19:21 +0000
(13:19 +0300)
committer
Felipe Balbi
<balbi@ti.com>
Sat, 10 Jan 2015 00:15:11 +0000
(18:15 -0600)
We try to free an ERR_PTR on this error path.
Fixes:
b44be2462dbe
('usb: gadget: gadgetfs: Free memory allocated by memdup_user()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/legacy/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/legacy/inode.c
b/drivers/usb/gadget/legacy/inode.c
index 08048613eed6bcf53f928e50fc1b7054ff41d165..db49ec4c748e9469bd694645c8cfc22df7c829fa 100644
(file)
--- a/
drivers/usb/gadget/legacy/inode.c
+++ b/
drivers/usb/gadget/legacy/inode.c
@@
-441,6
+441,7
@@
ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
kbuf = memdup_user(buf, len);
if (IS_ERR(kbuf)) {
value = PTR_ERR(kbuf);
+ kbuf = NULL;
goto free1;
}