public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Greg Kroah-Hartman <gregkh@suse.de>
Cc: kay.sievers@vrfy.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] class: Free the class private data in class_release
Date: Fri, 12 Feb 2010 09:16:58 +0200	[thread overview]
Message-ID: <1265959018.26471.5.camel@localhost> (raw)
In-Reply-To: <1265805169-31315-1-git-send-email-laurent.pinchart@ideasonboard.com>

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@ideasonboard.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 (Артём Битюцкий)


  parent reply	other threads:[~2010-02-12  7:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 11:35 [PATCH] class: Free the class private data in class_unregister Laurent Pinchart
2010-02-10 12:32 ` [PATCH v2] class: Free the class private data in class_release Laurent Pinchart
2010-02-10 16:05   ` Artem Bityutskiy
2010-02-12  7:16   ` Artem Bityutskiy [this message]
2010-02-12 15:19     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265959018.26471.5.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox