From: Patrick Pannuto on
This leak is the same as the bus path; cp's kobj name
is set, but kset_register fails, free'ing cp, but not
cp->class_subsys.kobj.name

Signed-off-by: Patrick Pannuto <ppannuto(a)codeaurora.org>
---
drivers/base/class.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8e231d0..045acaf 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -197,6 +197,7 @@ int __class_register(struct class *cls, struct lock_class_key *key)

error = kset_register(&cp->class_subsys);
if (error) {
+ kfree(cp->class_subsys.kobj.name);
kfree(cp);
return error;
}
--
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/