Files
linux-stable-mirror/drivers/net/ethernet/sfc
Abdun Nihaal 97b34c9765 sfc: fix potential memory leak in efx_mae_process_mport()
[ Upstream commit 46a499aaf8 ]

In efx_mae_enumerate_mports(), memory allocated for mae_mport_desc is
passed as a argument to efx_mae_process_mport(), but when the error path
in efx_mae_process_mport() gets executed, the memory allocated for desc
gets leaked.

Fix that by freeing the memory allocation before returning error.

Fixes: a6a15aca42 ("sfc: enumerate mports in ef100")
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20251023141844.25847-1-nihaal@cse.iitm.ac.in
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-11-13 15:33:59 -05:00
..
2024-09-11 16:02:21 -07:00
2024-09-11 16:02:21 -07:00
2024-09-11 16:02:21 -07:00
2024-09-11 16:02:21 -07:00
2024-09-06 18:06:40 -07:00
2024-08-30 11:10:02 -07:00