Skip to content

Commit fd60a0c

Browse files
LekensteynBrad Figg
authored andcommitted
rtlwifi: fix memory leak for USB device
BugLink: http://bugs.launchpad.net/bugs/1540532 commit 17bc558 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 <[email protected]> ACKed-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]>
1 parent 51a4ae9 commit fd60a0c

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/rtlwifi

1 file changed

+2
-0
lines changed

drivers/net/wireless/rtlwifi/usb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
531531
ieee80211_rx(hw, skb);
532532
else
533533
dev_kfree_skb_any(skb);
534+
} else {
535+
dev_kfree_skb_any(skb);
534536
}
535537
}
536538

0 commit comments

Comments
 (0)