Skip to content

Commit 4351b86

Browse files
Abdun Nihaalgregkh
authored andcommitted
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
[ Upstream commit be5febd ] 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: 1666108 ("wifi: ath12k: support ARP and NS offload") Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20251028170457.134608-1-nihaal@cse.iitm.ac.in Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b9f9fbc commit 4351b86

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+1
-0
lines changed

drivers/net/wireless/ath/ath12k/wow.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ static int ath12k_wow_arp_ns_offload(struct ath12k *ar, bool enable)
755755
if (ret) {
756756
ath12k_warn(ar->ab, "failed to set arp ns offload vdev %i: enable %d, ret %d\n",
757757
arvif->vdev_id, enable, ret);
758+
kfree(offload);
758759
return ret;
759760
}
760761
}

0 commit comments

Comments
 (0)