[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf3d9390-f1f6-428d-b47f-81d2ed1707e9@gmail.com>
Date: Thu, 23 Oct 2025 12:27:19 +0100
From: Edward Cree <ecree.xilinx@...il.com>
To: Abdun Nihaal <nihaal@....iitm.ac.in>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, alejandro.lucero-palau@....com,
habetsm.xilinx@...il.com, netdev@...r.kernel.org, linux-net-drivers@....com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] sfc: fix potential memory leak in
efx_mae_process_mport()
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 <nihaal@....iitm.ac.in>
Acked-by: Edward Cree <ecree.xilinx@...il.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.
Powered by blists - more mailing lists