[lvc-project] [PATCH net] mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
Ido Schimmel
idosch at nvidia.com
Wed Jul 3 20:26:38 MSK 2024
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 at t-argos.ru>
Reviewed-by: Ido Schimmel <idosch at nvidia.com>
More information about the lvc-project
mailing list