projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be0c007
)
bridge: Net device leak in br_add_bridge().
author
Pavel Emelyanov
<xemul@openvz.org>
Mon, 5 May 2008 00:57:29 +0000
(17:57 -0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 5 May 2008 00:57:29 +0000
(17:57 -0700)
In case the register_netdevice() call fails the device is leaked,
since the out: label is just rtnl_unlock()+return.
Free the device.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bridge/br_if.c
b/net/bridge/br_if.c
index 77a981a1ee52249d5fbed7966f294afe7730ffb3..bff0f5bb12be4598070465b68a5e30fba18c6c6e 100644
(file)
--- a/
net/bridge/br_if.c
+++ b/
net/bridge/br_if.c
@@
-280,8
+280,10
@@
int br_add_bridge(const char *name)
}
ret = register_netdevice(dev);
- if (ret)
+ if (ret) {
+ free_netdev(dev);
goto out;
+ }
ret = br_sysfs_addbr(dev);
if (ret)