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 <[email protected]>
---
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]