From: Christoph Jaeger <christophjaeger@linux.com>
To: johannes.thumshirn@men.de
Cc: linux-kernel@vger.kernel.org,
Christoph Jaeger <christophjaeger@linux.com>
Subject: [PATCH] drivers: mcb: fix memory leak in chameleon_parse_cells() error path
Date: Fri, 4 Apr 2014 21:04:58 +0200 [thread overview]
Message-ID: <1396638298-3173-1-git-send-email-christophjaeger@linux.com> (raw)
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
next reply other threads:[~2014-04-04 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 19:04 Christoph Jaeger [this message]
2014-04-07 14:02 ` Johannes Thumshirn
2014-04-07 16:31 ` Greg Kroah-Hartman
2014-04-10 6:16 ` Johannes Thumshirn
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=1396638298-3173-1-git-send-email-christophjaeger@linux.com \
--to=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
Powered by JetHome