Linux wireless drivers development
 help / color / mirror / Atom feed
From: Nicolas Escande <nico.escande@gmail.com>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 3/3] wifi: ath11k: fix error path leak in ath11k_tm_cmd_wmi_ftm()
Date: Wed,  6 May 2026 15:42:40 +0200	[thread overview]
Message-ID: <20260506134240.2284016-4-nico.escande@gmail.com> (raw)
In-Reply-To: <20260506134240.2284016-1-nico.escande@gmail.com>

This is similar to what was fixed by previous patches. We have a to
ath11k_wmi_cmd_send() which does check the return value, but forgot to
free the related skb.

Fixes: b43310e44edc ("wifi: ath11k: factory test mode support")
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
---
 drivers/net/wireless/ath/ath11k/testmode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath11k/testmode.c b/drivers/net/wireless/ath/ath11k/testmode.c
index a9751ea2a0b7..c72eed358f6d 100644
--- a/drivers/net/wireless/ath/ath11k/testmode.c
+++ b/drivers/net/wireless/ath/ath11k/testmode.c
@@ -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;
 		}
 
-- 
2.54.0


  parent reply	other threads:[~2026-05-06 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 13:42 [PATCH v2 0/3] fix leaks in some WMI error path Nicolas Escande
2026-05-06 13:42 ` [PATCH v2 1/3] wifi: ath11k: fix error path leaks in some WMI WOW calls Nicolas Escande
2026-05-06 13:42 ` [PATCH v2 2/3] wifi: ath11k: fix error path leaks in some WMI calls Nicolas Escande
2026-05-06 13:42 ` Nicolas Escande [this message]
2026-05-06 18:15   ` [PATCH v2 3/3] wifi: ath11k: fix error path leak in ath11k_tm_cmd_wmi_ftm() Rameshkumar Sundaram
2026-05-06 18:16 ` [PATCH v2 0/3] fix leaks in some WMI error path Rameshkumar Sundaram
2026-05-11  4:56 ` Baochen Qiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260506134240.2284016-4-nico.escande@gmail.com \
    --to=nico.escande@gmail.com \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox