]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()
authorZiyang Xuan <william.xuanziyang@huawei.com>
Sat, 19 Nov 2022 05:19:00 +0000 (13:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:18 +0000 (13:32 +0100)
commitfce7e46273649d9cdcd98d89551975a65f206a14
tree8173d2c1d5df41418817fb8ddb2349cada93b92c
parent98dbd1329b4a6c17e0b1583101867cf4251e6fc0
wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()

[ Upstream commit 895b3b06efc285c1245242e9638b9ae251dc13ec ]

urbs does not be freed in exception paths in __lf_x_usb_enable_rx().
That will trigger memory leak. To fix it, add kfree() for urbs within
"error" label. Compile tested only.

Fixes: 68d57a07bfe5 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221119051900.1192401-1-william.xuanziyang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/purelifi/plfxlc/usb.c