mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
netfilter: Add the missed return value check of nft_register_chain_type
There are some codes of netfilter module which did not check the return value of nft_register_chain_type. Add the checks now. Signed-off-by: Gao Feng <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
parent
4e6577de71
commit
23d07508d2
6 changed files with 33 additions and 10 deletions
|
|
@ -100,7 +100,10 @@ static int __init nf_tables_ipv6_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
nft_register_chain_type(&filter_ipv6);
|
||||
ret = nft_register_chain_type(&filter_ipv6);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = register_pernet_subsys(&nf_tables_ipv6_net_ops);
|
||||
if (ret < 0)
|
||||
nft_unregister_chain_type(&filter_ipv6);
|
||||
|
|
|
|||
Loading…
Reference in a new issue