Re: [PATCH] ACPI / PCI: fix a memory leak bug

2019-08-20 Thread Wenwen Wang
On Mon, Aug 19, 2019 at 5:23 PM Bjorn Helgaas wrote: > > The subject line should give a clue about where the leak is, e.g., > > ACPI / PCI: fix acpi_pci_irq_enable() memory leak > > On Thu, Aug 15, 2019 at 11:33:22PM -0500, Wenwen Wang wrote: > > In acpi_pci_irq_enable(), 'entry' is allocated

Re: [PATCH] ACPI / PCI: fix a memory leak bug

2019-08-19 Thread Bjorn Helgaas
The subject line should give a clue about where the leak is, e.g., ACPI / PCI: fix acpi_pci_irq_enable() memory leak On Thu, Aug 15, 2019 at 11:33:22PM -0500, Wenwen Wang wrote: > In acpi_pci_irq_enable(), 'entry' is allocated by invoking > acpi_pci_irq_lookup(). However, it is not deallocated

[PATCH] ACPI / PCI: fix a memory leak bug

2019-08-15 Thread Wenwen Wang
In acpi_pci_irq_enable(), 'entry' is allocated by invoking acpi_pci_irq_lookup(). However, it is not deallocated if acpi_pci_irq_valid() returns false, leading to a memory leak. To fix this issue, free 'entry' before returning 0. Signed-off-by: Wenwen Wang --- drivers/acpi/pci_irq.c | 4 +++- 1