ath11k: fix memory leak in testmode
Subsystems (2)
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.
Signed-off-by Karthikeyan Periyasamy <[email protected]>
--- drivers/net/wireless/ath/ath11k/testmode.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath11k/testmode.c +1 -0
@@ -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
Quoted 6 lines · Karthikeyan Periyasamy
when
ath11k_wmi_cmd_send()fails, caller need to free up the skb. Inath11k_tm_cmd_wmi(), skb free not happen when wmi command send fails. so free up the skb in the error case.Signed-off-by Karthikeyan Periyasamy <[email protected]>Signed-off-by Kalle Valo <[email protected]>
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