diff options
| author | Dave Jones <davej@redhat.com> | 2004-09-02 00:38:52 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-02 00:38:52 -0700 |
| commit | fe64daa043515e3eb3f2a6a2c626e39cf4cd25ea (patch) | |
| tree | c72fda654fd7aa9f78cc5012f7671a0e157c2cf7 | |
| parent | 799cc2cf39fa1391cd93f510d492cfd41e430166 (diff) | |
[PATCH] Fix leak in ISAPNP core
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/pnp/isapnp/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index ee6d1ed502ff..bf52990a8e91 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -655,8 +655,10 @@ static int __init isapnp_create_device(struct pnp_card *card, 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) { |
