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

wd: fix memory leak

Unmap mapped IO in wd_probe1() if register_netdev() failed.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8aa06af4
......@@ -358,8 +358,10 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
#endif
err = register_netdev(dev);
if (err)
if (err) {
free_irq(dev->irq, dev);
iounmap(ei_status.mem);
}
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册