summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorAleksandr Mishin <amishin@t-argos.ru>2024-07-03 23:32:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-11 12:47:12 +0200
commitab557f5cd993a3201b09593633d04b891263d5c0 (patch)
treeaf22ea2bbd77b609e800346ce04daff54baac704 /drivers/platform
parentd6f487e0704de2f2d15f8dd5d7d723210f2b2fdb (diff)
downloadlinux-ab557f5cd993a3201b09593633d04b891263d5c0.tar.gz
linux-ab557f5cd993a3201b09593633d04b891263d5c0.tar.bz2
linux-ab557f5cd993a3201b09593633d04b891263d5c0.zip
mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
[ Upstream commit 8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3 ] 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 occurred after mlxsw_linecard_types_init() call, mlxsw_linecards_init() calls mlxsw_linecard_types_fini() which performs memory deallocation again. 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@t-argos.ru> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com> Link: https://patch.msgid.link/20240703203251.8871-1-amishin@t-argos.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform')
0 files changed, 0 insertions, 0 deletions