In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftables: Fix a memory leak in nftables_updchain
If nftnetdevregisterhooks() fails, the memory associated with nftstats is not freed, causing a memory leak.
This patch fixes it by moving nftstatsalloc() down after nftnetdevregister_hooks() succeeds.