From: Raja Mani Date: Mon, 1 Jun 2015 09:23:33 +0000 (+0530) Subject: ath10k: free wmi mgmt event skb when parsing fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=08603f2e1c31839510747899a5e0b9448b502ee0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 77220b0f0e89..226bd2141629 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; }