linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@men.de>
To: Christoph Jaeger <christophjaeger@linux.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <johannes.thumshirn@men.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers: mcb: fix memory leak in chameleon_parse_cells() error path
Date: Mon, 7 Apr 2014 16:02:06 +0200	[thread overview]
Message-ID: <20140407140206.GA23383@jtlinux> (raw)
In-Reply-To: <1396638298-3173-1-git-send-email-christophjaeger@linux.com>

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?

Thanks,
	Johannes

  reply	other threads:[~2014-04-07 14:02 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 [this message]
2014-04-07 16:31   ` Greg Kroah-Hartman
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=20140407140206.GA23383@jtlinux \
    --to=johannes.thumshirn@men.de \
    --cc=christophjaeger@linux.com \
    --cc=gregkh@linuxfoundation.org \
    --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).