GFP_KERNEL);
if (!net->ipv6.ip6_dst_ops)
goto out;
- net->ipv6.ip6_dst_ops->dst_net = net;
+ net->ipv6.ip6_dst_ops->dst_net = hold_net(net);
net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template,
sizeof(*net->ipv6.ip6_null_entry),
return ret;
out_ip6_dst_ops:
+ release_net(net->ipv6.ip6_dst_ops->dst_net);
kfree(net->ipv6.ip6_dst_ops);
goto out;
}
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
+ release_net(net->ipv6.ip6_dst_ops->dst_net);
kfree(net->ipv6.ip6_dst_ops);
}