You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
LoongArch: Fix memleak in pci_acpi_scan_root()
[ Upstream commit 5016c3a31a6d74eaf2fdfdec673eae8fcf90379e ] Add kfree(root_ops) in this case to avoid memleak of root_ops, leaks when pci_find_bus() != 0. Signed-off-by: Yuli Wang <wangyuli@uniontech.com> Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c66562408c
commit
b52f1fbb06
@@ -222,6 +222,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
|
||||
if (bus) {
|
||||
memcpy(bus->sysdata, info->cfg, sizeof(struct pci_config_window));
|
||||
kfree(info);
|
||||
kfree(root_ops);
|
||||
} else {
|
||||
struct pci_bus *child;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user