# Re: \[PATCH v2 net\] sfc: fix potential memory leak in efx\_mae\_process\_mport()

- From: Abdun Nihaal \<hidden\>
- Date: 2025-10-24 14:36:58 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/10/3266019
- Thread: https://ratatoskr.run/netdev/2025/10/3264320/t.md

```text
On Thu, Oct 23, 2025 at 05:48:12PM -0700, Jacob Keller wrote:
> Why not make the caller responsible for freeing desc on failure?

I put the free inside because another function efx_mae_add_mport 
called by efx_mae_process_mport was freeing desc on failure, so I
followed the same style of code, but yes making the caller responsible
would be more cleaner. I'll send a revised patch.
```
