[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1265959018.26471.5.camel@localhost>
Date: Fri, 12 Feb 2010 09:16:58 +0200
From: Artem Bityutskiy <dedekind1@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Greg Kroah-Hartman <gregkh@...e.de>
Cc: kay.sievers@...y.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] class: Free the class private data in class_release
On Wed, 2010-02-10 at 13:32 +0100, Laurent Pinchart wrote:
> Fix a memory leak by freeing the memory allocated in __class_register
> for the class private data.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> ---
> 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 = {
This looks like 2.6.33 material for me. CC-ing Andrew.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists