diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-09-03 01:28:56 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-09-11 13:04:15 +0200 |
| commit | cbdd39ce42530a193c56beb206a3356cb6d01016 (patch) | |
| tree | 9bef09431167f1830444bb782f3920afe2573e58 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 444e4c88c9c62a3d823069006563513fe7d5aa66 (diff) | |
| download | linux-cbdd39ce42530a193c56beb206a3356cb6d01016.tar.gz linux-cbdd39ce42530a193c56beb206a3356cb6d01016.zip | |
netfilter: nf_nat: unregister and release hooks on error
If nf_hook_entries_insert_raw() fails, the NAT hooks get never released,
resulting in a memleak.
Postpone setting nat_proto_net->nat_hook_ops when the hooks are
registered to simplify the error path to decide whether the nat hooks
need unwinding.
Fixes: 1cd472bf036c ("netfilter: nf_nat: add nat hook register functions to nf_nat")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
