On Fri, Oct 02, 2026 at 07:47:40PM +0000, Sang-Hoon Choi wrote:
mlxsw_sp_fib_create() initializes fib->ht before binding the LPM tree.
If the bind fails, the error path releases the tree and frees fib without
destroying the initialized hash table, leaking its bucket allocation.
Destroy fib->ht on the post-initialization failure path.
Fixes: 2b52ce02e1d1 ("mlxsw: spectrum_router: Remove unnecessary prefix lengths from LPM tree")
Reported-by: Changyul Lee <redacted>
Assisted-by: LLM
Signed-off-by: Sang-Hoon Choi <redacted>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>