mirror of
https://github.com/acpica/acpica/
synced 2025-02-13 03:54:24 +03:00
Fix for possible memory leak and fault.
Fixed a possible memory leak and fault in AcpiExResolveObjectToValue during a read from a buffer or region field. (BZ 458)
This commit is contained in:
parent
c4e6cb4356
commit
ad9364590f
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresolv - AML Interpreter object resolution
|
||||
* $Revision: 1.139 $
|
||||
* $Revision: 1.140 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -230,7 +230,7 @@ AcpiExResolveObjectToValue (
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_OPERAND_OBJECT *StackDesc;
|
||||
void *TempNode;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc = NULL;
|
||||
UINT16 Opcode;
|
||||
|
||||
|
||||
@ -397,8 +397,6 @@ AcpiExResolveObjectToValue (
|
||||
break;
|
||||
|
||||
|
||||
/* These cases may never happen here, but just in case.. */
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
@ -408,6 +406,10 @@ AcpiExResolveObjectToValue (
|
||||
StackDesc, ACPI_GET_OBJECT_TYPE (StackDesc)));
|
||||
|
||||
Status = AcpiExReadDataFromField (WalkState, StackDesc, &ObjDesc);
|
||||
|
||||
/* Remove a reference to the original operand, then override */
|
||||
|
||||
AcpiUtRemoveReference (*StackPtr);
|
||||
*StackPtr = (void *) ObjDesc;
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user