From: Tomasz Nowicki Date: Mon, 10 Feb 2014 13:00:11 +0000 (+0100) Subject: ACPI / PCI: Fix memory leak in acpi_pci_irq_enable() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b685f3b1744061aa9ad822548ba9c674de5be7c6;p=linux-beck.git 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 Cc: All applicable [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 52d45ea2bc4f..361b40c10c3f 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; }