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:
fdb51e3
)
usb: gadget: printer: use after free in gprinter_alloc_inst()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 13 Mar 2015 09:11:42 +0000
(12:11 +0300)
committer
Felipe Balbi
<balbi@ti.com>
Fri, 13 Mar 2015 15:41:01 +0000
(10:41 -0500)
There was a missing goto so we free "opts" and then dereference it.
Fixes:
ee1cd515e889
('usb: gadget: printer: add configfs support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_printer.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/function/f_printer.c
b/drivers/usb/gadget/function/f_printer.c
index caa56de3a3e865422c566bf5862550cf36d69fd1..48882ecf16106f0743fc587458fbe2794e035844 100644
(file)
--- a/
drivers/usb/gadget/function/f_printer.c
+++ b/
drivers/usb/gadget/function/f_printer.c
@@
-1307,6
+1307,7
@@
static struct usb_function_instance *gprinter_alloc_inst(void)
kfree(opts);
if (idr_is_empty(&printer_ida.idr))
gprinter_cleanup();
+ goto unlock;
}
config_group_init_type_name(&opts->func_inst.group, "",
&printer_func_type);