提交 3390712a 编写于 作者: K Kulikov Vasiliy 提交者: David S. Miller

net/ne: fix memory leak in ne_drv_probe()

net_device allocated with alloc_eip_netdev() must be freed.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 44b451f1
......@@ -806,8 +806,10 @@ static int __init ne_drv_probe(struct platform_device *pdev)
dev->base_addr = res->start;
dev->irq = platform_get_irq(pdev, 0);
} else {
if (this_dev < 0 || this_dev >= MAX_NE_CARDS)
if (this_dev < 0 || this_dev >= MAX_NE_CARDS) {
free_netdev(dev);
return -EINVAL;
}
dev->base_addr = io[this_dev];
dev->irq = irq[this_dev];
dev->mem_end = bad[this_dev];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册