[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <606e4570-46ad-454d-a018-3bf2dd582dc2@oss.qualcomm.com>
Date: Wed, 29 Oct 2025 10:02:40 +0800
From: Baochen Qiang <baochen.qiang@....qualcomm.com>
To: Abdun Nihaal <nihaal@....iitm.ac.in>, jjohnson@...nel.org
Cc: linux-wireless@...r.kernel.org, ath12k@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: ath12k: fix potential memory leak in
ath12k_wow_arp_ns_offload()
On 10/29/2025 1:04 AM, Abdun Nihaal wrote:
> When the call to ath12k_wmi_arp_ns_offload() fails, the temporary memory
> allocation for offload is not freed before returning. Fix that by
> freeing offload in the error path.
>
> Fixes: 1666108c74c4 ("wifi: ath12k: support ARP and NS offload")
> Signed-off-by: Abdun Nihaal <nihaal@....iitm.ac.in>
> ---
> Compile tested only. Issue found using static analysis.
>
> drivers/net/wireless/ath/ath12k/wow.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath12k/wow.c b/drivers/net/wireless/ath/ath12k/wow.c
> index dce9bd0bcaef..e8481626f194 100644
> --- a/drivers/net/wireless/ath/ath12k/wow.c
> +++ b/drivers/net/wireless/ath/ath12k/wow.c
> @@ -758,6 +758,7 @@ static int ath12k_wow_arp_ns_offload(struct ath12k *ar, bool enable)
> if (ret) {
> ath12k_warn(ar->ab, "failed to set arp ns offload vdev %i: enable %d, ret %d\n",
> arvif->vdev_id, enable, ret);
> + kfree(offload);
> return ret;
> }
> }
Reviewed-by: Baochen Qiang <baochen.qiang@....qualcomm.com>
Powered by blists - more mailing lists