diff options
author | Quan Tian <tianquan23@gmail.com> | 2024-03-07 01:24:02 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-03-21 12:12:06 +0100 |
commit | 7eaf837a4eb5f74561e2486972e7f5184b613f6e (patch) | |
tree | 1ff3a636002bce1d85f2d2ac1baa028926c9447f /scripts/bpf_doc.py | |
parent | 4a0e7f2decbf9bd72461226f1f5f7dcc4b08f139 (diff) |
netfilter: nf_tables: Fix a memory leak in nf_tables_updchain
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>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions