projects
/
platform
/
kernel
/
linux-stable.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
|
history
diff --git
a/drivers/net/bonding/bond_main.c
b/drivers/net/bonding/bond_main.c
index
1787e3c
..
430c022
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();