diff options
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r-- | net/ipv6/reassembly.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index dce699fb2672..45efc39753e2 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -681,7 +681,7 @@ static int ip6_frags_ns_sysctl_register(struct net *net) | |||
681 | struct ctl_table_header *hdr; | 681 | struct ctl_table_header *hdr; |
682 | 682 | ||
683 | table = ip6_frags_ns_ctl_table; | 683 | table = ip6_frags_ns_ctl_table; |
684 | if (net != &init_net) { | 684 | if (!net_eq(net, &init_net)) { |
685 | table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL); | 685 | table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL); |
686 | if (table == NULL) | 686 | if (table == NULL) |
687 | goto err_alloc; | 687 | goto err_alloc; |
@@ -699,7 +699,7 @@ static int ip6_frags_ns_sysctl_register(struct net *net) | |||
699 | return 0; | 699 | return 0; |
700 | 700 | ||
701 | err_reg: | 701 | err_reg: |
702 | if (net != &init_net) | 702 | if (!net_eq(net, &init_net)) |
703 | kfree(table); | 703 | kfree(table); |
704 | err_alloc: | 704 | err_alloc: |
705 | return -ENOMEM; | 705 | return -ENOMEM; |