net: fix percpu memory leaks
[deliverable/linux.git] / net / ipv6 / netfilter / nf_conntrack_reasm.c
index 99610547fccc1549774cb1c22cfa82ba22ae9a10..d5efeb87350e7fc8643962036c0b26cfe471cdc4 100644 (file)
@@ -648,12 +648,18 @@ EXPORT_SYMBOL_GPL(nf_ct_frag6_consume_orig);
 
 static int nf_ct_net_init(struct net *net)
 {
+       int res;
+
        net->nf_frag.frags.high_thresh = IPV6_FRAG_HIGH_THRESH;
        net->nf_frag.frags.low_thresh = IPV6_FRAG_LOW_THRESH;
        net->nf_frag.frags.timeout = IPV6_FRAG_TIMEOUT;
-       inet_frags_init_net(&net->nf_frag.frags);
-
-       return nf_ct_frag6_sysctl_register(net);
+       res = inet_frags_init_net(&net->nf_frag.frags);
+       if (res)
+               return res;
+       res = nf_ct_frag6_sysctl_register(net);
+       if (res)
+               inet_frags_uninit_net(&net->nf_frag.frags);
+       return res;
 }
 
 static void nf_ct_net_exit(struct net *net)
This page took 0.025232 seconds and 5 git commands to generate.