Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d6184e4 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3729d502
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();