diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-19 08:54:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-29 00:08:06 +0100 |
commit | 4f84d82f7a623f8641af2574425c329431ff158f (patch) | |
tree | 639acc6831d8d99d4ca4c2a5ec3c78831b41c084 /net/core/rtnetlink.c | |
parent | [NETNS]: Double free in netlink_release. (diff) | |
download | linux-4f84d82f7a623f8641af2574425c329431ff158f.tar.xz linux-4f84d82f7a623f8641af2574425c329431ff158f.zip |
[NETNS]: Memory leak on network namespace stop.
Network namespace allocates 2 kernel netlink sockets, fibnl &
rtnl. These sockets should be disposed properly, i.e. by
sock_release. Plain sock_put is not enough.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 8c45d7e35ee9..a5f4f661fa62 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -1384,7 +1384,7 @@ static void rtnetlink_net_exit(struct net *net) * free. */ sk->sk_net = get_net(&init_net); - sock_put(sk); + sock_release(net->rtnl->sk_socket); net->rtnl = NULL; } } |