From: Greg Kroah-Hartman on 16 Feb 2010 19:20 From: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com> Fix a memory leak by freeing the memory allocated in __class_register for the class private data. Signed-off-by: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy(a)nokia.com> Cc: stable <stable(a)kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- 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 161746d..6e2c3b0 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 = { -- 1.7.0 -- 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/
|
Pages: 1 Prev: [GIT PATCH] USB patches for 2.6.33-rc8 Next: [GIT PATCH] IBFT patches for 2.6.33-rc8 |