提交 8d6184e4 编写于 作者: P Patrick McHardy 提交者: David S. Miller

bonding: fix device leak on error in bond_create()

When the register_netdevice() call fails, the newly allocated device is
not freed.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3729d502
......@@ -4946,6 +4946,8 @@ int bond_create(struct net *net, const char *name)
}
res = register_netdevice(bond_dev);
if (res < 0)
goto out_netdev;
out:
rtnl_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册