projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c0ff87
)
class: Free the class private data in class_release
author
Laurent Pinchart
<laurent.pinchart@ideasonboard.com>
Wed, 10 Feb 2010 12:32:49 +0000
(13:32 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 16 Feb 2010 23:43:00 +0000
(15:43 -0800)
Fix a memory leak by freeing the memory allocated in __class_register
for the class private data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/class.c
patch
|
blob
|
history
diff --git
a/drivers/base/class.c
b/drivers/base/class.c
index
161746d
..
6e2c3b0
100644
(file)
--- a/
drivers/base/class.c
+++ b/
drivers/base/class.c
@@
-59,6
+59,8
@@
static void class_release(struct kobject *kobj)
else
pr_debug("class '%s' does not have a release() function, "
"be careful\n", class->name);
+
+ kfree(cp);
}
static struct sysfs_ops class_sysfs_ops = {