projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3729d50
)
bonding: fix device leak on error in bond_create()
author
Patrick McHardy
<kaber@trash.net>
Sat, 27 Feb 2010 10:52:05 +0000
(
02:52
-0800)
committer
David S. Miller
<davem@davemloft.net>
Sat, 27 Feb 2010 10:52:05 +0000
(
02:52
-0800)
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>
drivers/net/bonding/bond_main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/bonding/bond_main.c
b/drivers/net/bonding/bond_main.c
index 1787e3c8657390ef6180d6d6c218ce679f9465b7..430c02267d7e9ec26d3c8b59922d919fc5fedb97 100644
(file)
--- a/
drivers/net/bonding/bond_main.c
+++ b/
drivers/net/bonding/bond_main.c
@@
-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();