All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@men.de>
To: Christoph Jaeger <christophjaeger@linux.com>
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: Thu, 10 Apr 2014 08:16:20 +0200	[thread overview]
Message-ID: <20140410061620.GA6278@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
>

Hi,

Your patch has been applied to my repo located at:

https://github.com/morbidrsa/linux/tree/mcb

or

git://github.com/morbidrsa/linux.git

Thanks,
	Johannes

  parent reply	other threads:[~2014-04-10  6:16 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
2014-04-10  6:16 ` Johannes Thumshirn [this message]
  -- 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=20140410061620.GA6278@jtlinux \
    --to=johannes.thumshirn@men.de \
    --cc=christophjaeger@linux.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.