浏览代码

ath10k: prevent beacon memory leak

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>
Michal Kazior 11 年之前
父节点
当前提交
ad3d2153bd
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/wireless/ath/ath10k/wmi.c

+ 1 - 0
drivers/net/wireless/ath/ath10k/wmi.c

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