dect
/
linux-2.6
Archived
13
0
Fork 0

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: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy 2010-02-27 02:52:05 -08:00 committed by David S. Miller
parent 3729d50212
commit 8d6184e488
1 changed files with 2 additions and 0 deletions

View File

@ -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();