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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Apr 2012 04:05:33 +0000 (00:05 -0400)
commitb922934d017f1cc831b017913ed7d1a56c558b43
tree6d0d08fc459a3eb2d36bccea023059ef76b90dfe
parent9fe5642f4a3b13beb43c2633db7df22dd9d99250
netns: do not leak net_generic data on failed init

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>
net/core/net_namespace.c