Merge tag 'acpi-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a possible crash on an attempt to free unallocated memory in the
  error path of acpi_evaluate_reference() that has been introduced by
  one of the recent changes (Rafael Wysocki)"

* tag 'acpi-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: utils: Fix error path in acpi_evaluate_reference()
This commit is contained in:
Linus Torvalds
2023-12-08 11:54:07 -08:00

View File

@@ -399,13 +399,13 @@ acpi_evaluate_reference(acpi_handle handle,
acpi_handle_debug(list->handles[i], "Found in reference list\n");
}
end:
if (ACPI_FAILURE(status)) {
list->count = 0;
kfree(list->handles);
list->handles = NULL;
}
end:
kfree(buffer.pointer);
return status;