]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Tue, 28 Oct 2025 17:04:55 +0000 (22:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:44 +0000 (14:02 +0100)
commitd0bb3db7b2959581270b77669faca67441a8f3af
tree7a5b0e8c88249cc3dc3821240971da9f01713d89
parentcbd5021199db356c6dc1928d48e3fb132dbbc9bb
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()

[ Upstream commit be5febd51c478bc8e24ad3480435f2754a403b14 ]

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@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>
drivers/net/wireless/ath/ath12k/wow.c