summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRaja Mani <rmani@qti.qualcomm.com>2015-06-01 14:53:33 +0530
committerKalle Valo <kvalo@qca.qualcomm.com>2015-06-09 13:40:42 +0300
commit08603f2e1c31839510747899a5e0b9448b502ee0 (patch)
tree61e647ed08432f9397eaabab96ae7285bf0f3113 /drivers/net/wireless
parent0bcbbe679b66fee1b56def5cb30bfb4f616b1127 (diff)
downloadop-kernel-dev-08603f2e1c31839510747899a5e0b9448b502ee0.zip
op-kernel-dev-08603f2e1c31839510747899a5e0b9448b502ee0.tar.gz
ath10k: free wmi mgmt event skb when parsing fails
When wmi mgmt event function fails to parse given skb, it should be freed on failure condition to avoid memory leaks. Found this during the code review. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 77220b0..226bd21 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1451,6 +1451,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
ret = ath10k_wmi_pull_mgmt_rx(ar, skb, &arg);
if (ret) {
ath10k_warn(ar, "failed to parse mgmt rx event: %d\n", ret);
+ dev_kfree_skb(skb);
return ret;
}
OpenPOWER on IntegriCloud