Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilities: Avoid deleting the same object twice in a row
If OriginalCount is 0 in AcpiUtUpdateRefCount (), AcpiUtDeleteInternalObj () is invoked for the target object, which is incorrect, because that object has been deleted once already and the memory allocated to store it may have been reclaimed and allocated for a different purpose by the host OS. Moreover, a confusing debug message following the "Reference Count is already zero, cannot decrement" warning is printed in that case. To fix this issue, make AcpiUtUpdateRefCount () return after finding that OriginalCount is 0 and printing the above warning. Link: #652 Reported-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
- Loading branch information