]> www.infradead.org Git - linux.git/commit
LoongArch: Fix memleak in pci_acpi_scan_root()
authorWentao Guan <guanwentao@uniontech.com>
Tue, 24 Sep 2024 07:32:20 +0000 (15:32 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 24 Sep 2024 07:32:20 +0000 (15:32 +0800)
commit5016c3a31a6d74eaf2fdfdec673eae8fcf90379e
tree3588ee06fb8900fc73ec3bd683805d896e925f9b
parentd4f31acf1302088a5b16d1e4de890729acfa9638
LoongArch: Fix memleak in pci_acpi_scan_root()

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