Revision 7eaf837a4eb5f74561e2486972e7f5184b613f6e authored by Quan Tian on 06 March 2024, 17:24:02 UTC, committed by Pablo Neira Ayuso on 21 March 2024, 11:12:06 UTC
If nft_netdev_register_hooks() fails, the memory associated with
nft_stats is not freed, causing a memory leak.

This patch fixes it by moving nft_stats_alloc() down after
nft_netdev_register_hooks() succeeds.

Fixes: b9703ed44ffb ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Signed-off-by: Quan Tian <tianquan23@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 4a0e7f2
History
File Mode Size
channel-mapping-api.rst -rw-r--r-- 5.9 KB
compress-offload.rst -rw-r--r-- 15.0 KB
control-names.rst -rw-r--r-- 3.8 KB
index.rst -rw-r--r-- 278 bytes
jack-controls.rst -rw-r--r-- 1.5 KB
jack-injection.rst -rw-r--r-- 4.4 KB
midi-2.0.rst -rw-r--r-- 22.6 KB
oss-emulation.rst -rw-r--r-- 10.5 KB
powersave.rst -rw-r--r-- 2.0 KB
procfile.rst -rw-r--r-- 6.6 KB
seq-oss.rst -rw-r--r-- 12.8 KB
timestamping.rst -rw-r--r-- 10.7 KB
tracepoints.rst -rw-r--r-- 7.8 KB

back to top