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