mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
net/mlx5: HWS: Fix memory leak in mlx5hws_definer_calc_layout
It allocates a match template, which creates a compressed definer fc
struct, but that is not deallocated.
This commit fixes that.
Fixes: 74a778b4a6 ("net/mlx5: HWS, added definers handling")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241203204920.232744-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5f4d0356f0
commit
530b69a269
|
|
@ -39,6 +39,8 @@ bool mlx5hws_bwc_match_params_is_complex(struct mlx5hws_context *ctx,
|
|||
} else {
|
||||
mlx5hws_err(ctx, "Failed to calculate matcher definer layout\n");
|
||||
}
|
||||
} else {
|
||||
kfree(mt->fc);
|
||||
}
|
||||
|
||||
mlx5hws_match_template_destroy(mt);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user