* [PATCH] Fix leak in ISAPNP core
@ 2004-09-01 15:51 Dave Jones
0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2004-09-01 15:51 UTC (permalink / raw)
To: linux-kernel
This looks odd, but there doesn't seem to be an
isapnp_free() or similar..
Spotted with the source checker from Coverity.com.
Signed-off-by: Dave Jones <davej@redhat.com>
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/pnp/isapnp/core.c linux-2.6/drivers/pnp/isapnp/core.c
--- bk-linus/drivers/pnp/isapnp/core.c 2004-06-19 00:01:33.000000000 +0100
+++ linux-2.6/drivers/pnp/isapnp/core.c 2004-08-23 14:08:16.000000000 +0100
@@ -655,8 +655,10 @@ static int __init isapnp_create_device(s
if ((dev = isapnp_parse_device(card, size, number++)) == NULL)
return 1;
option = pnp_register_independent_option(dev);
- if (!option)
+ if (!option) {
+ kfree(dev);
return 1;
+ }
pnp_add_card_device(card,dev);
while (1) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-01 15:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 15:51 [PATCH] Fix leak in ISAPNP core Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®