]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netns: do not leak net_generic data on failed init
authorJulian Anastasov <ja@ssi.bg>
Mon, 16 Apr 2012 04:43:15 +0000 (04:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:17:05 +0000 (10:17 -0700)
commite6f8c8491515dcaa8686d7e6b805edd4aba281d8
tree0fb3ce5341d308afc28f85cad65cb44d8dc494b3
parent07b267776c0746c14b28d931a623fb59736a672a
netns: do not leak net_generic data on failed init

[ Upstream commit b922934d017f1cc831b017913ed7d1a56c558b43 ]

ops_init should free the net_generic data on
init failure and __register_pernet_operations should not
call ops_free when NET_NS is not enabled.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/net_namespace.c