On Wed, Jul 05, 2023 at 08:15:27PM +0800, Zhengchao Shao wrote: > when mlx5_cmd_exec failed in mlx5dr_cmd_create_reformat_ctx, the memory > pointed by 'in' is not released, which will cause memory leak. Move memory > release after mlx5_cmd_exec. > > Fixes: 1d9186476e12 ("net/mlx5: DR, Add direct rule command utilities") > Signed-off-by: Zhengchao Shao <shaozhengchao@xxxxxxxxxx> > --- > v2: goto label 'err_free_in' to free 'in' > --- > drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>