[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230705121956.GO6455@unreal>
Date: Wed, 5 Jul 2023 15:19:56 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Zhengchao Shao <shaozhengchao@...wei.com>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
valex@...dia.com, kliteyn@...dia.com, mbloch@...dia.com,
danielj@...dia.com, erezsh@...lanox.com, saeedm@...dia.com,
weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net,v2] net/mlx5: DR, fix memory leak in
mlx5dr_cmd_create_reformat_ctx
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@...wei.com>
> ---
> 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@...dia.com>
Powered by blists - more mailing lists