mirror of
https://github.com/acpica/acpica/
synced 2025-02-16 13:34:07 +03:00
Move table OwnerID deletion to the lowest level, AcpiTbUninstallTable to eliminate any leaks.
This commit is contained in:
parent
e1620a57b3
commit
562cc52314
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
|
||||
* $Revision: 1.98 $
|
||||
* $Revision: 1.99 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -614,7 +614,6 @@ AcpiExUnloadTable (
|
||||
* (Offset contains the TableId)
|
||||
*/
|
||||
AcpiNsDeleteNamespaceByOwner (TableInfo->OwnerId);
|
||||
AcpiUtReleaseOwnerId (&TableInfo->OwnerId);
|
||||
|
||||
/* Delete the table itself */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: tbinstal - ACPI table installation and removal
|
||||
* $Revision: 1.86 $
|
||||
* $Revision: 1.87 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -363,7 +363,7 @@ AcpiTbInitTableDescriptor (
|
||||
Status = AcpiUtAllocateOwnerId (&TableDesc->OwnerId);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
goto ErrorExit1;
|
||||
}
|
||||
|
||||
/* Install the table into the global data structure */
|
||||
@ -383,8 +383,8 @@ AcpiTbInitTableDescriptor (
|
||||
*/
|
||||
if (ListHead->Next)
|
||||
{
|
||||
ACPI_FREE (TableDesc);
|
||||
return_ACPI_STATUS (AE_ALREADY_EXISTS);
|
||||
Status = AE_ALREADY_EXISTS;
|
||||
goto ErrorExit2;
|
||||
}
|
||||
|
||||
TableDesc->Next = ListHead->Next;
|
||||
@ -451,6 +451,18 @@ AcpiTbInitTableDescriptor (
|
||||
TableInfo->OwnerId = TableDesc->OwnerId;
|
||||
TableInfo->InstalledDesc = TableDesc;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
|
||||
|
||||
/* Error exit with cleanup */
|
||||
|
||||
ErrorExit2:
|
||||
|
||||
AcpiUtReleaseOwnerId (&TableDesc->OwnerId);
|
||||
|
||||
ErrorExit1:
|
||||
|
||||
ACPI_FREE (TableDesc);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
@ -670,6 +682,10 @@ AcpiTbUninstallTable (
|
||||
|
||||
AcpiTbDeleteSingleTable (TableDesc);
|
||||
|
||||
/* Free the owner ID associated with this table */
|
||||
|
||||
AcpiUtReleaseOwnerId (&TableDesc->OwnerId);
|
||||
|
||||
/* Free the table descriptor */
|
||||
|
||||
NextDesc = TableDesc->Next;
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: tbxface - Public interfaces to the ACPI subsystem
|
||||
* ACPI table oriented interfaces
|
||||
* $Revision: 1.78 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -362,7 +362,6 @@ AcpiUnloadTable (
|
||||
* simply a position within the hierarchy
|
||||
*/
|
||||
AcpiNsDeleteNamespaceByOwner (TableDesc->OwnerId);
|
||||
AcpiUtReleaseOwnerId (&TableDesc->OwnerId);
|
||||
TableDesc = TableDesc->Next;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user