summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/acpi/boot.c
diff options
context:
space:
mode:
authorKonrad Rzeszutek <konradr@redhat.com>2006-06-15 18:08:30 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 21:00:01 +0200
commitacc7c2e0b73a46122ec370bf8a3aa9f19065d331 (patch)
tree6e37db90a6e73aa2095d00e66314b3c3dec7e072 /arch/i386/kernel/acpi/boot.c
parent[PATCH] PCI: fix error with pci_get_device() call in the mpc85xx driver (diff)
downloadlinux-acc7c2e0b73a46122ec370bf8a3aa9f19065d331.tar.xz
linux-acc7c2e0b73a46122ec370bf8a3aa9f19065d331.zip
[PATCH] PCI: fix memory leak in MMCONFIG error path
This a bit late (yours patch was posted about a year ago), but a co-worker of spotted part of the code that looks like a memory leak. Looking at the code it seems that pci_mmcfg_config should be free-ed if MMCONFIG is above 4GB. From: Konrad Rzeszutek <konradr@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/i386/kernel/acpi/boot.c')
-rw-r--r--arch/i386/kernel/acpi/boot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 40e5aba3ad3d..fbe93084244c 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -202,6 +202,8 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
if (mcfg->config[i].base_reserved) {
printk(KERN_ERR PREFIX
"MMCONFIG not in low 4GB of memory\n");
+ kfree(pci_mmcfg_config);
+ pci_mmcfg_config_num = 0;
return -ENODEV;
}
}