Skip to contentSkip to conversation

ath11k: fix memory leak in testmode

PATCH In review Karthikeyan Periyasamy 2 participants 2 messages Jul 16, 2019 – Jul 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k: fix memory leak in testmode

when ath11k_wmi_cmd_send() fails, caller need to free up the skb. In ath11k_tm_cmd_wmi(), skb free not happen when wmi command send fails. so free up the skb in the error case.

---
 drivers/net/wireless/ath/ath11k/testmode.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath11k/testmode.c +1 -0
index 96ed2d2..9274b6c 100644
@@ -160,6 +160,7 @@ static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[])
 
 	ret = ath11k_wmi_cmd_send(wmi, skb, cmd_id);
 	if (ret) {
+		dev_kfree_skb(skb);
 		ath11k_warn(ar->ab, "failed to transmit wmi command (testmode): %d\n",
 			    ret);
 		goto out;
Signature · 7 lines
1.9.1


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 6 lines · Karthikeyan Periyasamy

when ath11k_wmi_cmd_send() fails, caller need to free up the skb. In ath11k_tm_cmd_wmi(), skb free not happen when wmi command send fails. so free up the skb in the error case.

Patch applied to ath11k-bringup branch of ath.git, thanks.

0c7d3c242f82 ath11k: fix memory leak in testmode

Signature · 9 lines
https://patchwork.kernel.org/patch/11046167/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k