From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jaroslav Kysela <perex@suse.cz>, Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH] Fix resource leak in isapnp
Date: Sun, 19 Mar 2006 00:52:27 +0100 [thread overview]
Message-ID: <200603190052.27770.jesper.juhl@gmail.com> (raw)
We may leak memory in drivers/pnp/isapnp/core.c::isapnp_create_device()
Spotted by the Coverity checker as bug #666 - this should fix it.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/pnp/isapnp/core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.16-rc6-orig/drivers/pnp/isapnp/core.c 2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.16-rc6/drivers/pnp/isapnp/core.c 2006-03-19 00:49:04.000000000 +0100
@@ -646,8 +646,10 @@ static int __init isapnp_create_device(s
size = 0;
skip = 0;
option = pnp_register_independent_option(dev);
- if (!option)
+ if (!option) {
+ kfree(dev);
return 1;
+ }
pnp_add_card_device(card,dev);
} else {
skip = 1;
reply other threads:[~2006-03-18 23:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200603190052.27770.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
/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