mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()
[ Upstream commit895b3b06ef
] 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:68d57a07bf
("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>
This commit is contained in:
parent
98dbd1329b
commit
fce7e46273
1 changed files with 1 additions and 0 deletions
|
@ -247,6 +247,7 @@ static int __lf_x_usb_enable_rx(struct plfxlc_usb *usb)
|
|||
for (i = 0; i < RX_URBS_COUNT; i++)
|
||||
free_rx_urb(urbs[i]);
|
||||
}
|
||||
kfree(urbs);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue