[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZoWJzqaRJKjtTlNO@shredder.mtl.com>
Date: Wed, 3 Jul 2024 20:26:38 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Aleksandr Mishin <amishin@...rgos.ru>
Cc: Jiri Pirko <jiri@...nulli.us>, Petr Machata <petrm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH net] mlxsw: core_linecards: Fix double memory
deallocation in case of invalid INI file
On Tue, Jul 02, 2024 at 01:33:52PM +0300, Aleksandr Mishin wrote:
> In case of invalid INI file mlxsw_linecard_types_init() deallocates memory
> but doesn't reset pointer to NULL and returns 0. In case of any error
> occured after mlxsw_linecard_types_init() call, mlxsw_linecards_init()
> calls mlxsw_linecard_types_fini() which perform memory deallocation again.
s/perform/performs/
>
> Add pointer reset to NULL.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: b217127e5e4e ("mlxsw: core_linecards: Add line card objects and implement provisioning")
> Signed-off-by: Aleksandr Mishin <amishin@...rgos.ru>
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists