diff options
author | Quan Tian <tianquan23@gmail.com> | 2024-03-06 20:24:02 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-03-21 14:12:06 +0300 |
commit | 7eaf837a4eb5f74561e2486972e7f5184b613f6e (patch) | |
tree | 1ff3a636002bce1d85f2d2ac1baa028926c9447f /tools/testing | |
parent | 4a0e7f2decbf9bd72461226f1f5f7dcc4b08f139 (diff) | |
download | linux-7eaf837a4eb5f74561e2486972e7f5184b613f6e.tar.xz |
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 'tools/testing')
0 files changed, 0 insertions, 0 deletions