diff options
author | Tomasz Nowicki <tomasz.nowicki@linaro.org> | 2014-02-10 17:00:11 +0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-03-05 20:13:47 +0400 |
commit | bb0a8dd760df353a9ca6c52ddb07d959272595ca (patch) | |
tree | 24ce8a53d6f3034e2df10f7cd0d4f707e9b0c3ec /drivers/acpi/pci_irq.c | |
parent | f77706d47ac3ed59419bd61aaa2ae6d2b0fba029 (diff) | |
download | linux-bb0a8dd760df353a9ca6c52ddb07d959272595ca.tar.xz |
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r-- | drivers/acpi/pci_irq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 41c5e1b799ef..f658e0948703 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -432,6 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) pin_name(pin)); } + kfree(entry); return 0; } |