]> Gentwo Git Trees - linux/.git/commit
PCI/ACPI: Fix pci_acpi_preserve_config() memory leak
authorNirmoy Das <nirmoyd@nvidia.com>
Mon, 25 Aug 2025 21:46:42 +0000 (14:46 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 27 Aug 2025 22:28:07 +0000 (17:28 -0500)
commitfac679df7580979174c90303f004b09cdc6f086f
tree0fc85e4a13e873ad225ac9393d30a59c3d3bdd6b
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
PCI/ACPI: Fix pci_acpi_preserve_config() memory leak

pci_acpi_preserve_config() leaks memory by returning early without freeing
the ACPI object on success. Fix that by always freeing the obj, which is
not needed by the caller.

Fixes: 9d7d5db8e78e ("PCI: Move PRESERVE_BOOT_CONFIG _DSM evaluation to pci_register_host_bridge()")
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250825214642.142135-1-nirmoyd@nvidia.com
drivers/pci/pci-acpi.c