Commit fe64daa0 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[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: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 799cc2cf
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment