aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-19 02:54:15 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:06 -0500
commit4f84d82f7a623f8641af2574425c329431ff158f (patch)
tree639acc6831d8d99d4ca4c2a5ec3c78831b41c084 /net/core/rtnetlink.c
parent869e58f87094b1e8a0df49232e4a5172678d46c9 (diff)
[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.c2
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)
1384 * free. 1384 * free.
1385 */ 1385 */
1386 sk->sk_net = get_net(&init_net); 1386 sk->sk_net = get_net(&init_net);
1387 sock_put(sk); 1387 sock_release(net->rtnl->sk_socket);
1388 net->rtnl = NULL; 1388 net->rtnl = NULL;
1389 } 1389 }
1390} 1390}