Skip to content

Commit 2e9c1da

Browse files
Loic Poulainjeff-t-johnson
authored andcommitted
wifi: ath10k: Fix memory leak on unsupported WMI command
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>
1 parent 4ff71af commit 2e9c1da

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
@@ -1938,6 +1938,7 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
19381938
if (cmd_id == WMI_CMD_UNSUPPORTED) {
19391939
ath10k_warn(ar, "wmi command %d is not supported by firmware\n",
19401940
cmd_id);
1941+
dev_kfree_skb_any(skb);
19411942
return ret;
19421943
}
19431944

0 commit comments

Comments
 (0)