Fix leak in ISAPNP core
Subsystems (2)
PATCH 1/1 Fix leak in ISAPNP core
This looks odd, but there doesn't seem to be anisapnp_free() or similar..
Spotted with the source checker from Coverity.com.
Signed-off-by Dave Jones <[email protected]>
drivers/pnp/isapnp/core.c +3 -1
@@ -655,8 +655,10 @@ static int __init isapnp_create_device(sif ((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 ) {