projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a33279d
)
USB: fix possible null deref in init_usb_class()
author
Dan Carpenter
<error27@gmail.com>
Tue, 10 Nov 2009 09:02:08 +0000
(11:02 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 11 Dec 2009 19:55:22 +0000
(11:55 -0800)
Add a missing goto. We dereference usb_class on the next line.
Found by smatch static checker.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/file.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/core/file.c
b/drivers/usb/core/file.c
index 222ee07ea680f303d9ce0d5b94daaeaa9aa22c1d..bfc6c2eea6471d87bdf77455e4e4d8ca3e160ca1 100644
(file)
--- a/
drivers/usb/core/file.c
+++ b/
drivers/usb/core/file.c
@@
-99,6
+99,7
@@
static int init_usb_class(void)
printk(KERN_ERR "class_create failed for usb devices\n");
kfree(usb_class);
usb_class = NULL;
+ goto exit;
}
usb_class->class->devnode = usb_devnode;