projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4f31ac
)
LoongArch: Fix memleak in pci_acpi_scan_root()
author
Wentao Guan
<guanwentao@uniontech.com>
Tue, 24 Sep 2024 07:32:20 +0000
(15:32 +0800)
committer
Huacai Chen
<chenhuacai@loongson.cn>
Tue, 24 Sep 2024 07:32:20 +0000
(15:32 +0800)
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>
arch/loongarch/pci/acpi.c
patch
|
blob
|
history
diff --git
a/arch/loongarch/pci/acpi.c
b/arch/loongarch/pci/acpi.c
index
365f7de
..
1da4dc4
100644
(file)
--- a/
arch/loongarch/pci/acpi.c
+++ b/
arch/loongarch/pci/acpi.c
@@
-225,6
+225,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;