1
0
Fork 0

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>
hifive-unleashed-5.1
Tomasz Nowicki 2014-02-10 14:00:11 +01:00 committed by Rafael J. Wysocki
parent 6d0abeca32
commit b685f3b174
1 changed files with 1 additions and 0 deletions

View File

@ -430,6 +430,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pin_name(pin));
}
kfree(entry);
return 0;
}