mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
netfilter: nf_tables: fix error path in the init functions
We have to unregister chain type if this fails to register netns. Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
parent
3876d22dba
commit
cf4dfa8539
3 changed files with 21 additions and 3 deletions
|
|
@ -104,8 +104,14 @@ static const struct nf_chain_type filter_ipv6 = {
|
|||
|
||||
static int __init nf_tables_ipv6_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
nft_register_chain_type(&filter_ipv6);
|
||||
return register_pernet_subsys(&nf_tables_ipv6_net_ops);
|
||||
ret = register_pernet_subsys(&nf_tables_ipv6_net_ops);
|
||||
if (ret < 0)
|
||||
nft_unregister_chain_type(&filter_ipv6);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit nf_tables_ipv6_exit(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue