From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomasz Nowicki , "Rafael J. Wysocki" Subject: [PATCH 3.13 114/172] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable() Date: Tue, 4 Mar 2014 12:03:18 -0800 Message-Id: <20140304200303.361999304@linuxfoundation.org> In-Reply-To: <20140304200259.626667112@linuxfoundation.org> References: <20140304200259.626667112@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tomasz Nowicki 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 [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/pci_irq.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -432,6 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev * pin_name(pin)); } + kfree(entry); return 0; }