diff options
author | Robert Moore <Robert.Moore@intel.com> | 2023-02-07 10:16:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 10:16:01 -0800 |
commit | 3795c0fd7e6013ed02cc801bc6b8568410ae9fe2 (patch) | |
tree | d0959644b63685b4372226bd84e661eb3ae1f677 | |
parent | aeeeec3212712c9a3e03de1f197b39c875db7e7b (diff) | |
parent | 3eef1ae6fa9df8926355bbda51078b1429bb8dd4 (diff) | |
download | acpica-3795c0fd7e6013ed02cc801bc6b8568410ae9fe2.tar.gz |
Merge pull request #809 from rafaeljw/dispatcher
dispatcher: Fix error code path in AcpiDsCallControlMethod()
-rw-r--r-- | source/components/dispatcher/dsmethod.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index eea38a7ea..02d9c6bea 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -705,7 +705,7 @@ AcpiDsCallControlMethod ( if (!Info) { Status = AE_NO_MEMORY; - goto Cleanup; + goto PopWalkState; } Info->Parameters = &ThisWalkState->Operands[0]; @@ -717,7 +717,7 @@ AcpiDsCallControlMethod ( ACPI_FREE (Info); if (ACPI_FAILURE (Status)) { - goto Cleanup; + goto PopWalkState; } NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; @@ -764,6 +764,12 @@ AcpiDsCallControlMethod ( return_ACPI_STATUS (Status); +PopWalkState: + + /* On error, pop the walk state to be deleted from thread */ + + AcpiDsPopWalkState(Thread); + Cleanup: /* On error, we must terminate the method properly */ |