OSDN Git Service

ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
authorTomasz Nowicki <tomasz.nowicki@linaro.org>
Mon, 10 Feb 2014 13:00:11 +0000 (14:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 05:30:09 +0000 (21:30 -0800)
commit63b5b009bd51063de66847d3907df6859df4550f
tree86d146e37499f6a13cbf4d196c0a3adcbdba1aea
parent9942fc0221688975f1b9562638e8f27b3304ff19
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>
drivers/acpi/pci_irq.c