diff options
| author | Will Chen <will.chen.tty@gmail.com> | 2026-07-29 15:01:31 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-08-03 14:30:25 -0700 |
| commit | d1000fd7995e51deec872d154e0a40d82f7a539f (patch) | |
| tree | c09e37a810e3e5b708b14c5f98ba55d26545b10c /tools/perf/scripts/python/stackcollapse.py | |
| parent | d1ad8fb2ac6a1afb71dc22d9ae8efb4dda96c824 (diff) | |
bnxt: fix memory leak in bnxt_queue_mem_alloc error cases
There is a small memory leak in bnxt_queue_mem_alloc:
when bnxt_alloc_rx_agg_bmap() succeeds
but bnxt_alloc_one_tpa_info() later fails,
the rx_agg_bmap allocated by bnxt_alloc_rx_agg_bmap()
is not freed in the fallthrough cleanup cases.
Free the rx_agg_bmap in the err_free_rx_agg_ring case
and initialize clone->rx_agg_bmap = NULL earlier in the function
to allow for safe fallthrough.
Fixes: bd649c5cc958 ("bnxt_en: handle tpa_info in queue API implementation")
Signed-off-by: Will Chen <will.chen.tty@gmail.com>
Reviewed-by: Joe Damato <joe@dama.to>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260729220132.1256924-1-will.chen.tty@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
