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

eth16i: fix memory leak

Free allocated netdev if no probe is expected.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0eff683f
......@@ -1442,8 +1442,10 @@ int __init init_module(void)
dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]);
if(io[this_dev] == 0) {
if(this_dev != 0) /* Only autoprobe 1st one */
if (this_dev != 0) { /* Only autoprobe 1st one */
free_netdev(dev);
break;
}
printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册