Skip to content

Commit 22a9385

Browse files
Loic PoulainUlrich Hecht
authored andcommitted
wifi: ath10k: Fix memory leak on unsupported WMI command
[ Upstream commit 2e9c1da4ee9d0acfca2e0a3d78f3d8cb5802da1b ] ath10k_wmi_cmd_send takes ownership of the passed buffer (skb) and has the responsibility to release it in case of error. This patch fixes missing free in case of early error due to unhandled WMI command ID. Tested-on: WCN3990 hw1.0 WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1 Fixes: 5532155 ("ath10k: warn if give WMI command is not supported") Suggested-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20250926195656.187970-1-loic.poulain@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 4f2ba84 commit 22a9385

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/wireless/ath/ath10k

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,7 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
18711871
if (cmd_id == WMI_CMD_UNSUPPORTED) {
18721872
ath10k_warn(ar, "wmi command %d is not supported by firmware\n",
18731873
cmd_id);
1874+
dev_kfree_skb_any(skb);
18741875
return ret;
18751876
}
18761877

0 commit comments

Comments
 (0)