diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-02-10 13:32:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-02-23 07:37:57 -0800 |
commit | a206591bd37f7f63d1ccaabf73cbaff25b29f51d (patch) | |
tree | 242696cde171f67d680af96453615e32a4484fb2 | |
parent | 0f102935a606e13e923905451c097acf8e87e4cd (diff) |
class: Free the class private data in class_release
commit 18d19c96457d172d913510c083bc7411ed40cb10 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/class.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 161746deab4..6e2c3b064f5 100644 --- 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 = { |