diff options
author | Lior David <liord@codeaurora.org> | 2018-10-31 11:52:14 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-11-06 19:02:52 +0300 |
commit | 664497400c89a4d40aee51bcf48bbd2e4dc71104 (patch) | |
tree | 35667a6f5c549fd106cbadf7a5e1cd832ce243a1 /drivers/net/wireless | |
parent | e41ab937d47b3c1180057f72968bf62b487fc80f (diff) | |
download | linux-664497400c89a4d40aee51bcf48bbd2e4dc71104.tar.xz |
wil6210: fix memory leak in wil_find_tx_bcast_2
A successful call to wil_tx_ring takes skb reference so
it will only be freed in wil_tx_complete. Consume the skb
in wil_find_tx_bcast_2 to prevent memory leak.
Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index c592c8e42abc..3e1c831ab2fb 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -1395,6 +1395,8 @@ found: wil_dbg_txrx(wil, "BCAST DUP -> ring %d\n", i); wil_set_da_for_vring(wil, skb2, i); wil_tx_ring(wil, vif, v2, skb2); + /* successful call to wil_tx_ring takes skb2 ref */ + dev_kfree_skb_any(skb2); } else { wil_err(wil, "skb_copy failed\n"); } |