]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath11k: fix error path leak in ath11k_tm_cmd_wmi_ftm()
authorNicolas Escande <nico.escande@gmail.com>
Wed, 6 May 2026 13:42:40 +0000 (15:42 +0200)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 12 May 2026 13:57:23 +0000 (06:57 -0700)
This is similar to what was fixed by previous patches. We have a call
to ath11k_wmi_cmd_send() which does check the return value, but forgot
to free the related skb on error.

Fixes: b43310e44edc ("wifi: ath11k: factory test mode support")
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260506134240.2284016-4-nico.escande@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath11k/testmode.c

index a9751ea2a0b73009bfb600d51c3978200ce99114..c72eed358f6ddbc701f59ab3b35d6a791c03005c 100644 (file)
@@ -457,6 +457,7 @@ static int ath11k_tm_cmd_wmi_ftm(struct ath11k *ar, struct nlattr *tb[])
                ret = ath11k_wmi_cmd_send(wmi, skb, cmd_id);
                if (ret) {
                        ath11k_warn(ar->ab, "failed to send wmi ftm command: %d\n", ret);
+                       dev_kfree_skb(skb);
                        goto out;
                }