1
0
Fork 0

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>
hifive-unleashed-5.1
Raja Mani 2015-06-01 14:53:33 +05:30 committed by Kalle Valo
parent 0bcbbe679b
commit 08603f2e1c
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}