ath10k: prevent beacon memory leak
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 23 Apr 2014 16:30:06 +0000 (19:30 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 24 Apr 2014 06:22:52 +0000 (09:22 +0300)
If DMA mapping of next beacon failed ath10k leaked
the beacon.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/wmi.c

index 11176cc..72cc4f2 100644 (file)
@@ -1441,6 +1441,7 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
                                        ATH10K_SKB_CB(bcn)->paddr);
                if (ret) {
                        ath10k_warn("failed to map beacon: %d\n", ret);
+                       dev_kfree_skb_any(bcn);
                        goto skip;
                }