summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-12-08 11:54:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-12-08 11:54:07 -0800
commitc3e2f9bda2ffa2dd7dcaf2b45604db08c6ab0579 (patch)
treef80ab877b9946bf2706b3e97eeddf0e4964afcbb
parent0dfe14fca933dc729fd7671c7b8fa616d74856b7 (diff)
parent8f0b960a42badda7a2781e8a33564624200debc9 (diff)
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()
-rw-r--r--drivers/acpi/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 28c75242fca9..62944e35fcee 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -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;