diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-12-07 01:07:31 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-12-11 13:48:42 +0200 |
commit | 17bc55864f81dd730d05f09b1641312a7990d636 (patch) | |
tree | 1111981f64e4e984ef0de18a888d8a71a69d9fd1 /drivers/net | |
parent | 6b904f625271b8ded6f06663b7a0c2d41366ea19 (diff) |
rtlwifi: fix memory leak for USB device
Free skb for received frames with a wrong checksum. This can happen
pretty rapidly, exhausting all memory.
This fixes a memleak (detected with kmemleak). Originally found while
using monitor mode, but it also appears during managed mode (once the
link is up).
Cc: stable@vger.kernel.org
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 2721cf89fb16..aac1ed3f7bb4 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -531,6 +531,8 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw, ieee80211_rx(hw, skb); else dev_kfree_skb_any(skb); + } else { + dev_kfree_skb_any(skb); } } |