History

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()

Linus Torvalds committed 2 years ago

Commit c3e2f9b2 parents 0dfe14f 8f0b9601 file · +1 −1Browse files

Unified · Split

drivers/acpi/utils.c+1−1
@@ -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
402end:
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
408end:
409 kfree(buffer.pointer);409 kfree(buffer.pointer);
410 410
411 return status;411 return status;