xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 4 Dec 2015 13:53:42 +0000 (15:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Dec 2015 16:19:55 +0000 (08:19 -0800)
commit84ed91526f9881886d70a082032236edaa20e7d4
tree8a2a1d9a4f4fe7cf6991de5f31fc03612dea24c0
parent5377adb092664d336ac212499961cac5e8728794
xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()

There is a memory leak because acpi_evaluate_dsm() actually returns an
object which the caller is supposed to release. Fix this by calling
ACPI_FREE() for the returned object (this expands to kfree() so passing
NULL there is fine as well).

While there correct indentation in !CONFIG_ACPI case.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable <stable@vger.kernel.org> # v4.2
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci.c