diff options
author | Dongliang Mu <dzm91@hust.edu.cn> | 2023-03-09 10:16:36 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-03-13 15:45:30 +0200 |
commit | 48181d285623198c33bb9698992502687b258efa (patch) | |
tree | 0a373ec941dd36e1c573dfdae6a651947d661a19 /drivers/net/wireless/realtek | |
parent | 3ab7f9b90cc0a737e0bd8a312dc48814c4682867 (diff) | |
download | linux-48181d285623198c33bb9698992502687b258efa.tar.gz |
wifi: rtw88: fix memory leak in rtw_usb_probe()
drivers/net/wireless/realtek/rtw88/usb.c:876 rtw_usb_probe()
warn: 'hw' from ieee80211_alloc_hw() not released on lines: 811
Fix this by modifying return to a goto statement.
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230309021636.528601-1-dzm91@hust.edu.cn
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 2a8336b1847a..68e1b782d199 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -808,7 +808,7 @@ int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ret = rtw_usb_alloc_rx_bufs(rtwusb); if (ret) - return ret; + goto err_release_hw; ret = rtw_core_init(rtwdev); if (ret) |