Fix several possible memory leaks in the GPE handling.

This change fixes several potential memory leaks in the error paths
of the GPE handling code. Lv Zheng.
This commit is contained in:
Robert Moore 2013-09-18 13:34:02 -07:00
parent b30264449d
commit 6ac115c242

View File

@ -621,6 +621,7 @@ AcpiEvAsynchExecuteGpeMethod (
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
if (ACPI_FAILURE (Status))
{
ACPI_FREE (LocalGpeEventInfo);
return_VOID;
}
@ -629,6 +630,7 @@ AcpiEvAsynchExecuteGpeMethod (
if (!AcpiEvValidGpeEvent (GpeEventInfo))
{
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
ACPI_FREE (LocalGpeEventInfo);
return_VOID;
}
@ -642,6 +644,7 @@ AcpiEvAsynchExecuteGpeMethod (
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
if (ACPI_FAILURE (Status))
{
ACPI_FREE (LocalGpeEventInfo);
return_VOID;
}