[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJwF7lcZfj1NZgM9@shredder>
Date: Wed, 28 Jun 2023 13:05:34 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Zhengchao Shao <shaozhengchao@...wei.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, petrm@...dia.com,
jiri@...nulli.us, vadimp@...dia.com, yuehaibing@...wei.com
Subject: Re: [PATCH net,v2] mlxsw: minimal: fix potential memory leak in
mlxsw_m_linecards_init
On Wed, Jun 28, 2023 at 06:01:16PM +0800, Zhengchao Shao wrote:
> The line cards array is not freed in the error path of
> mlxsw_m_linecards_init(), which can lead to a memory leak. Fix by
> freeing the array in the error path, thereby making the error path
> identical to mlxsw_m_linecards_fini().
>
> Fixes: 01328e23a476 ("mlxsw: minimal: Extend module to port mapping with slot index")
> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
> Reviewed-by: Petr Machata <petrm@...dia.com>
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists