aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <[email protected]>2010-02-10 13:32:49 +0100
committerGreg Kroah-Hartman <[email protected]>2010-02-16 15:43:00 -0800
commit18d19c96457d172d913510c083bc7411ed40cb10 (patch)
tree34f1eb4addd2550a3c6cc09cebec06795ef948e4
parent7c0ff870d1ed287504a61ed865f3d728c757436b (diff)
class: Free the class private data in class_release
Fix a memory leak by freeing the memory allocated in __class_register for the class private data. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Artem Bityutskiy <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/base/class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 161746deab4b..6e2c3b064f53 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 = {