aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-09-06 13:59:30 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-12-02 14:07:28 -0500
commita135a89e616044a1ae9f261474bb2caeba634820 (patch)
tree93a3b7aec5b07a55962f7bb4bedace1324babf67
parent56e06c206399fabaa40dc8b7d4f0afc5d9b86870 (diff)
downloadlinux-yocto-a135a89e616044a1ae9f261474bb2caeba634820.tar.gz
linux-yocto-a135a89e616044a1ae9f261474bb2caeba634820.tar.bz2
linux-yocto-a135a89e616044a1ae9f261474bb2caeba634820.zip
ath9k: release allocated buffer if timed out
commit 728c1e2a05e4b5fc52fab3421dce772a806612a2 upstream. In ath9k_wmi_cmd, the allocated network buffer needs to be released if timeout happens. Otherwise memory will be leaked. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/wmi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index d1f6710ca63b..cdc146091194 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -336,6 +336,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex);
+ kfree_skb(skb);
return -ETIMEDOUT;
}