Commit 46a499aa authored by Abdun Nihaal's avatar Abdun Nihaal Committed by Jakub Kicinski
Browse files

sfc: fix potential memory leak in efx_mae_process_mport()



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: a6a15aca ("sfc: enumerate mports in ef100")
Acked-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
Signed-off-by: default avatarAbdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20251023141844.25847-1-nihaal@cse.iitm.ac.in


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 03ca7c8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment