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:
aystarik 2005-06-29 17:20:23 +00:00
parent 6850472c85
commit bfbbce75d4

View File

@ -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: