rtlwifi: fix memory leak for USB device
authorPeter Wu <peter@lekensteyn.nl>
Mon, 7 Dec 2015 00:07:31 +0000 (01:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:28:58 +0000 (11:28 -0800)
commit7e92cfc4783b49d077774d78ea5485aa82dc4953
treed9bfe17741407d34e08c19b3d0dc4f48eb196bf7
parentee8d049d0c7bbd5d739f3e873c4e66123d4da32c
rtlwifi: fix memory leak for USB device

commit 17bc55864f81dd730d05f09b1641312a7990d636 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: Peter Wu <peter@lekensteyn.nl>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/usb.c