[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZJ7XB7psFXVCpR53@corigine.com>
Date: Fri, 30 Jun 2023 15:22:15 +0200
From: Simon Horman <simon.horman@...igine.com>
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,
richardcochran@...il.com, saeedm@...dia.com, leon@...nel.org,
lkayal@...dia.com, tariqt@...dia.com, gal@...dia.com,
rrameshbabu@...dia.com, vadfed@...a.com, ayal@...dia.com,
eranbe@...dia.com, weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net,v2 2/2] net/mlx5e: fix memory leak in mlx5e_ptp_open
On Fri, Jun 30, 2023 at 09:49:03AM +0800, Zhengchao Shao wrote:
> When kvzalloc_node or kvzalloc failed in mlx5e_ptp_open, the memory
> pointed by "c" or "cparams" is not freed, which can lead to a memory
> leak. Fix by freeing the array in the error path.
>
> Fixes: 145e5637d941 ("net/mlx5e: Add TX PTP port object support")
> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> Reviewed-by: Gal Pressman <gal@...dia.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists