mirror of
https://github.com/acpica/acpica/
synced 2025-01-15 22:09:17 +03:00
Only delete field desc if it doesn't get stored.
date 2000.04.05.19.49.00; author rmoore1; state Exp;
This commit is contained in:
parent
6850472c85
commit
bfbbce75d4
@ -318,7 +318,7 @@ AmlExecCreateField (
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a temporary object for the field */
|
||||
/* Allocate an object for the field */
|
||||
|
||||
FieldDesc = CmCreateInternalObject (ACPI_TYPE_FieldUnit);
|
||||
if (!FieldDesc)
|
||||
@ -430,9 +430,14 @@ AmlExecCreateField (
|
||||
|
||||
Status = AmlExecStore (FieldDesc, ResDesc);
|
||||
|
||||
/* All done with the temp field descriptor */
|
||||
|
||||
CmDeleteInternalObject (FieldDesc);
|
||||
/*
|
||||
* If the field descriptor was not physically stored (or if a failure above), we
|
||||
* must delete it
|
||||
*/
|
||||
if (FieldDesc->Common.ReferenceCount <= 1)
|
||||
{
|
||||
CmDeleteInternalObject (FieldDesc);
|
||||
}
|
||||
|
||||
|
||||
Cleanup:
|
||||
|
Loading…
Reference in New Issue
Block a user