summaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
authorTomasz Nowicki <tomasz.nowicki@linaro.org>2014-02-10 13:00:11 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-18 14:47:23 (GMT)
commitb685f3b1744061aa9ad822548ba9c674de5be7c6 (patch)
tree8cc708d7adecddfe1f0a9b9de7282499b61875f0 /drivers/acpi/pci_irq.c
parent6d0abeca3242a88cab8232e4acd7e2bf088f3bc2 (diff)
downloadlinux-b685f3b1744061aa9ad822548ba9c674de5be7c6.tar.xz
ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
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> Cc: All applicable <stable@vger.kernel.org> [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-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 52d45ea..361b40c 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -430,6 +430,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pin_name(pin));
}
+ kfree(entry);
return 0;
}