diff options
author | Robert Moore <Robert.Moore@intel.com> | 2016-11-17 08:34:17 -0800 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2016-11-17 08:34:17 -0800 |
commit | 35ce65feeb347a1e42b02b5ac220579f8e25859a (patch) | |
tree | 60601a19ebaa3f32162eb6b88622369588a67863 | |
parent | 040740976de77c2ccdae15604434aa3f1ae52f91 (diff) | |
download | acpica-35ce65feeb347a1e42b02b5ac220579f8e25859a.tar.gz |
Table Manager: Fix error path memory leak while getting table(s) from file
Possible leak after allocation of table descriptor.
-rw-r--r-- | source/common/acfileio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/common/acfileio.c b/source/common/acfileio.c index 8af52d117..9b4564ea3 100644 --- a/source/common/acfileio.c +++ b/source/common/acfileio.c @@ -238,7 +238,7 @@ AcGetAllTablesFromFile ( #ifdef ACPI_ASL_COMPILER - AcpiTbPrintTableHeader (0, Table); + AcpiTbPrintTableHeader (0, Table); #endif /* Allocate and link a table descriptor */ @@ -246,9 +246,11 @@ AcGetAllTablesFromFile ( TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC)); if (!TableDesc) { + AcpiOsFree (Table); Status = AE_NO_MEMORY; goto Exit; } + TableDesc->Table = Table; TableDesc->Next = NULL; @@ -341,7 +343,6 @@ AcGetOneTableFromFile ( return (Status); } - if (GetOnlyAmlTables) { /* |