mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
net/ne: fix memory leak in ne_drv_probe()
net_device allocated with alloc_eip_netdev() must be freed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
44b451f163
commit
3390712a47
1 changed files with 3 additions and 1 deletions
|
@ -806,8 +806,10 @@ static int __init ne_drv_probe(struct platform_device *pdev)
|
||||||
dev->base_addr = res->start;
|
dev->base_addr = res->start;
|
||||||
dev->irq = platform_get_irq(pdev, 0);
|
dev->irq = platform_get_irq(pdev, 0);
|
||||||
} else {
|
} else {
|
||||||
if (this_dev < 0 || this_dev >= MAX_NE_CARDS)
|
if (this_dev < 0 || this_dev >= MAX_NE_CARDS) {
|
||||||
|
free_netdev(dev);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
dev->base_addr = io[this_dev];
|
dev->base_addr = io[this_dev];
|
||||||
dev->irq = irq[this_dev];
|
dev->irq = irq[this_dev];
|
||||||
dev->mem_end = bad[this_dev];
|
dev->mem_end = bad[this_dev];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue