mirror of
https://github.com/acpica/acpica/
synced 2025-01-20 16:39:25 +03:00
Merge pull request #295 from kkamagui/fix_operand_cache_memory_leak_in_acpi_ds_obj_stack_pop_and_delete
acpi: acpica: fix acpi operand cache leak in dsutils.c
This commit is contained in:
commit
28b55ece2b
@ -867,6 +867,8 @@ AcpiDsCreateOperands (
|
||||
ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS];
|
||||
UINT32 ArgCount = 0;
|
||||
UINT32 Index = WalkState->NumOperands;
|
||||
UINT32 PrevNumOperands = WalkState->NumOperands;
|
||||
UINT32 NewNumOperands;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
@ -899,6 +901,7 @@ AcpiDsCreateOperands (
|
||||
|
||||
/* Create the interpreter arguments, in reverse order */
|
||||
|
||||
NewNumOperands = Index;
|
||||
Index--;
|
||||
for (i = 0; i < ArgCount; i++)
|
||||
{
|
||||
@ -926,7 +929,11 @@ Cleanup:
|
||||
* pop everything off of the operand stack and delete those
|
||||
* objects
|
||||
*/
|
||||
AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
|
||||
WalkState->NumOperands = i;
|
||||
AcpiDsObjStackPopAndDelete (NewNumOperands, WalkState);
|
||||
|
||||
/* Restore operand count */
|
||||
WalkState->NumOperands = PrevNumOperands;
|
||||
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %u", Index));
|
||||
return_ACPI_STATUS (Status);
|
||||
|
Loading…
Reference in New Issue
Block a user