diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-14 20:57:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-14 20:57:19 -0400 |
commit | 04d5821fa506551afbc072456fecee7b34b2977d (patch) | |
tree | ef2ffa3907d3c2137f9f4affdaa32badfdc60cd6 | |
parent | 0eff683f737bf684dc9299e2eaca79cceb80a8c1 (diff) |
eth16i: fix memory leak
Free allocated netdev if no probe is expected.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/eth16i.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index 874973f558e9..10e39f2b31c3 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
@@ -1442,8 +1442,10 @@ int __init init_module(void) | |||
1442 | dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]); | 1442 | dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]); |
1443 | 1443 | ||
1444 | if(io[this_dev] == 0) { | 1444 | if(io[this_dev] == 0) { |
1445 | if(this_dev != 0) /* Only autoprobe 1st one */ | 1445 | if (this_dev != 0) { /* Only autoprobe 1st one */ |
1446 | free_netdev(dev); | ||
1446 | break; | 1447 | break; |
1448 | } | ||
1447 | 1449 | ||
1448 | printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n"); | 1450 | printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n"); |
1449 | } | 1451 | } |