OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6087b2d
)
spi: potential memleak in spidev_ioctl
author
Florin Malita
<fmalita@gmail.com>
Wed, 23 May 2007 20:57:45 +0000
(13:57 -0700)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Thu, 24 May 2007 03:14:12 +0000
(20:14 -0700)
'ioc' should be deallocated if __copy_from_user fails (found by Coverity
- CID 1644).
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/spidev.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spidev.c
b/drivers/spi/spidev.c
index
bcfef04
..
d04242a
100644
(file)
--- a/
drivers/spi/spidev.c
+++ b/
drivers/spi/spidev.c
@@
-364,6
+364,7
@@
spidev_ioctl(struct inode *inode, struct file *filp,
break;
}
if (__copy_from_user(ioc, (void __user *)arg, tmp)) {
+ kfree(ioc);
retval = -EFAULT;
break;
}