OSDN Git Service

rtl8xxxu: prevent potential memory leak
authorChris Chiu <chiu@endlessm.com>
Sun, 6 Sep 2020 04:04:24 +0000 (12:04 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Sep 2020 07:29:43 +0000 (10:29 +0300)
commit86279456a4d47782398d3cb8193f78f672e36cac
tree0080e053e73b050b578b10c270e852d39cdbd293
parent587231ee81d63f31560220d3d01162037c0eb7f1
rtl8xxxu: prevent potential memory leak

Free the skb if usb_submit_urb fails on rx_urb. And free the urb
no matter usb_submit_urb succeeds or not in rtl8xxxu_submit_int_urb.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200906040424.22022-1-chiu@endlessm.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c