summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-17 14:51:24 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-17 14:51:24 -0800
commit190b10367b0d311f68dc71e40b254fd4427affc2 (patch)
tree397fd9a82eb016400d4bb06bd4573dda99813d2b /drivers/acpi
parente75080f185c103a638c66d7b65c673769a57cb87 (diff)
parent09e15086936e01d7588020be37ea724116bcefec (diff)
Merge tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "This fixes a possible memory leak in an error code path in one of the utility routines (Xiongfeng Wang)" * tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 0a9e5979aaa9..9d49a1acebe3 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -355,6 +355,7 @@ acpi_evaluate_reference(acpi_handle handle,
}
if (package->package.count > ACPI_MAX_HANDLES) {
+ kfree(package);
return AE_NO_MEMORY;
}
list->count = package->package.count;