On 22/10/2025 17:35, Abdun Nihaal wrote:
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: a6a15aca4207 ("sfc: enumerate mports in ef100")
Signed-off-by: Abdun Nihaal <redacted>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
It might be nice to also add a comment on top of efx_mae_process_mport()
stating that it takes ownership of @desc from the caller.