summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds2017-11-17 23:51:24 +0100
committerLinus Torvalds2017-11-17 23:51:24 +0100
commit190b10367b0d311f68dc71e40b254fd4427affc2 (patch)
tree397fd9a82eb016400d4bb06bd4573dda99813d2b /drivers/acpi
parentMerge tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
parentACPI / utils: Fix memory leak in acpi_evaluate_reference() error path (diff)
downloadkernel-qcow2-linux-190b10367b0d311f68dc71e40b254fd4427affc2.tar.gz
kernel-qcow2-linux-190b10367b0d311f68dc71e40b254fd4427affc2.tar.xz
kernel-qcow2-linux-190b10367b0d311f68dc71e40b254fd4427affc2.zip
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;