summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorTomasz Nowicki <tomasz.nowicki@linaro.org>2014-02-10 14:00:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 21:30:09 -0800
commit63b5b009bd51063de66847d3907df6859df4550f (patch)
tree86d146e37499f6a13cbf4d196c0a3adcbdba1aea /drivers/acpi
parent9942fc0221688975f1b9562638e8f27b3304ff19 (diff)
ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
commit b685f3b1744061aa9ad822548ba9c674de5be7c6 upstream. acpi_pci_link_allocate_irq() can return negative gsi even if entry != NULL. For that case we have a memory leak, so free entry before returning from acpi_pci_irq_enable() for gsi < 0. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_irq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 41c5e1b799ef..f658e0948703 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -432,6 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pin_name(pin));
}
+ kfree(entry);
return 0;
}