linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johannes Thumshirn <johannes.thumshirn@men.de>
Cc: Christoph Jaeger <christophjaeger@linux.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: mcb: fix memory leak in chameleon_parse_cells() error path
Date: Mon, 7 Apr 2014 09:31:19 -0700	[thread overview]
Message-ID: <20140407163119.GB5658@kroah.com> (raw)
In-Reply-To: <20140407140206.GA23383@jtlinux>

On Mon, Apr 07, 2014 at 04:02:06PM +0200, Johannes Thumshirn wrote:
> On Fri, Apr 04, 2014 at 09:04:58PM +0200, Christoph Jaeger wrote:
> > chameleon_parse_cells() bails out if chameleon descriptor type is
> > invalid but does not free the storage 'header' points to.
> >
> > Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
> > ---
> >  drivers/mcb/mcb-parse.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c
> > index d1278b5..0049269 100644
> > --- a/drivers/mcb/mcb-parse.c
> > +++ b/drivers/mcb/mcb-parse.c
> > @@ -141,6 +141,7 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
> >  		default:
> >  			pr_err("Invalid chameleon descriptor type 0x%x\n",
> >  				dtype);
> > +			kfree(header);
> >  			return -EINVAL;
> >  		}
> >  		num_cells++;
> > --
> > 1.9.0
> >
> 
> *Doh*
> 
> Thanks for the patch.
> 
> @Greg, how should be the process here? Should I collect MCB related patches
> somewhere and forward them to you, or do you pick them up yourself?

Please collect them up and forward them on to me, that's what a
maintainer's job is :)

thanks,

greg k-h

  reply	other threads:[~2014-04-07 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 19:04 [PATCH] drivers: mcb: fix memory leak in chameleon_parse_cells() error path Christoph Jaeger
2014-04-07 14:02 ` Johannes Thumshirn
2014-04-07 16:31   ` Greg Kroah-Hartman [this message]
2014-04-10  6:16 ` Johannes Thumshirn
  -- strict thread matches above, loose matches on Subject: below --
2014-04-11 16:40 Johannes Thumshirn

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=20140407163119.GB5658@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=christophjaeger@linux.com \
    --cc=johannes.thumshirn@men.de \
    --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;
as well as URLs for NNTP newsgroup(s).