Message ID | 1563285872-13408-1-git-send-email-periyasa@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 0c7d3c242f82097088d9cd1fc84180b6ddcd4461 |
Delegated to: | Kalle Valo |
Headers | show |
Series | ath11k: fix memory leak in testmode | expand |
Karthikeyan Periyasamy <periyasa@codeaurora.org> wrote: > 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 <periyasa@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Patch applied to ath11k-bringup branch of ath.git, thanks. 0c7d3c242f82 ath11k: fix memory leak in testmode
diff --git a/drivers/net/wireless/ath/ath11k/testmode.c b/drivers/net/wireless/ath/ath11k/testmode.c index 96ed2d2..9274b6c 100644 --- a/drivers/net/wireless/ath/ath11k/testmode.c +++ b/drivers/net/wireless/ath/ath11k/testmode.c @@ -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;
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 <periyasa@codeaurora.org> --- drivers/net/wireless/ath/ath11k/testmode.c | 1 + 1 file changed, 1 insertion(+)