Commit 5ad6094b authored by Peter Wu's avatar Peter Wu Committed by Ben Hutchings

rtlwifi: fix memory leak for USB device

commit 17bc5586 upstream.

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).
Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
ACKed-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent bc53b1e2
......@@ -500,6 +500,8 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
} else {
dev_kfree_skb_any(skb);
}
} else {
dev_kfree_skb_any(skb);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment