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()
Unified · Split
| @@ -399,13 +399,13 @@ acpi_evaluate_reference(acpi_handle handle, · 398 unmodified lines | |||
| 399 | acpi_handle_debug(list->handles[i], "Found in reference list\n"); | 399 | acpi_handle_debug(list->handles[i], "Found in reference list\n"); |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | end: | ||
| 403 | if (ACPI_FAILURE(status)) { | 402 | if (ACPI_FAILURE(status)) { |
| 404 | list->count = 0; | 403 | list->count = 0; |
| 405 | kfree(list->handles); | 404 | kfree(list->handles); |
| 406 | list->handles = NULL; | 405 | list->handles = NULL; |
| 407 | } | 406 | } |
| 408 | 407 | ||
| 408 | end: | ||
| 409 | kfree(buffer.pointer); | 409 | kfree(buffer.pointer); |
| 410 | 410 | ||
| 411 | return status; | 411 | return status; |