diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index b96df54d00365..534a53124d14c 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -140,12 +140,12 @@ static int ops_init(const struct pernet_operations *ops, struct net *net) return 0; if (ops->id && ops->size) { -cleanup: ng = rcu_dereference_protected(net->gen, lockdep_is_held(&pernet_ops_rwsem)); ng->ptr[*ops->id] = NULL; } +cleanup: kfree(data); out: