All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	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 07:19:54 -0800	[thread overview]
Message-ID: <20100212151954.GA944@suse.de> (raw)
In-Reply-To: <1265959018.26471.5.camel@localhost>

On Fri, Feb 12, 2010 at 09:16:58AM +0200, Artem Bityutskiy wrote:
> 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.

Heh, I can handle .33 stuff just fine :)

thanks,

greg k-h

      reply	other threads:[~2010-02-12 15:36 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
2010-02-12 15:19     ` Greg KH [this message]

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=20100212151954.GA944@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=dedekind1@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.