diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 8c5707db53c5f6e33987b7215a4b3843c60cd610..bb185a28de9890d2f4b3c57d1ca7af7600f9b2aa 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1177,8 +1177,10 @@ static int mpls_net_init(struct net *net) table[0].data = net; net->mpls.ctl = register_net_sysctl(net, "net/mpls", table); - if (net->mpls.ctl == NULL) + if (net->mpls.ctl == NULL) { + kfree(table); return -ENOMEM; + } return 0; }