Re: [PATCH] Fix memory leak in brcmf_get_module_param

From: Arend Van Spriel
Date: Sun Mar 30 2025 - 06:14:10 EST


On March 30, 2025 12:09:04 PM Arend Van Spriel <arend.vanspriel@xxxxxxxxxxxx> wrote:

On March 30, 2025 11:35:41 AM Abdun Nihaal <abdun.nihaal@xxxxxxxxx> wrote:

The memory allocated for settings is not freed when brcmf_of_probe
fails. Fix that by freeing settings before returning in error path.

Fixes: 0ff0843310b7 ("wifi: brcmfmac: Add optional lpo clock enable support")

Good catch. Thanks for the fix.

The patch is fine, but a minor procedural nit that I should mention. The subject of patches for brcmfmac should have prefix "wifi: brcmfmac:" as shown in the Fixes: line. Hopefully Kalle can take care of that.

Regards,
Arend


Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Abdun Nihaal <abdun.nihaal@xxxxxxxxx>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)