projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e75c5f
)
Free the memory allocated by memdup_user() in fs/sysfs/bin.c
author
Catalin Marinas
<catalin.marinas@arm.com>
Wed, 8 Jul 2009 10:17:34 +0000
(11:17 +0100)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 8 Jul 2009 16:34:07 +0000
(09:34 -0700)
Commit
1c8542c7bb
replaced kmalloc() with memdup_user() in the write()
function but also dropped the kfree(temp). The memdup_user() function
allocates memory which is never freed.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Parag Warudkar <parag.warudkar@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/sysfs/bin.c
patch
|
blob
|
history
diff --git
a/fs/sysfs/bin.c
b/fs/sysfs/bin.c
index
9345806
..
2524714
100644
(file)
--- a/
fs/sysfs/bin.c
+++ b/
fs/sysfs/bin.c
@@
-171,6
+171,7
@@
static ssize_t write(struct file *file, const char __user *userbuf,
if (count > 0)
*off = offs + count;
+ kfree(temp);
return count;
}