projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f64478
)
USB: fix dereference in drivers/usb/misc/adutux.c
author
Eric Sesterhenn
<snakebyte@gmx.de>
Thu, 5 Oct 2006 22:09:29 +0000
(
00:09
+0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 17 Oct 2006 21:46:33 +0000
(14:46 -0700)
in two of the error cases, dev is still NULL,
and we dereference it. Spotted by coverity (cid#1428, 1429)
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/adutux.c
patch
|
blob
|
history
diff --git
a/drivers/usb/misc/adutux.c
b/drivers/usb/misc/adutux.c
index aecd633fe9f6966f20a9879f8b455675ffbc7d27..af2934e016a7e76313816ba480e81a060de5a4b4 100644
(file)
--- a/
drivers/usb/misc/adutux.c
+++ b/
drivers/usb/misc/adutux.c
@@
-370,7
+370,8
@@
static int adu_release(struct inode *inode, struct file *file)
retval = adu_release_internal(dev);
exit:
- up(&dev->sem);
+ if (dev)
+ up(&dev->sem);
dbg(2," %s : leave, return value %d", __FUNCTION__, retval);
return retval;
}