aboutsummaryrefslogtreecommitdiffstats
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
parentMerge tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
parentACPI / utils: Fix memory leak in acpi_evaluate_reference() error path (diff)
downloadlinux-dev-190b10367b0d311f68dc71e40b254fd4427affc2.tar.xz
linux-dev-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
-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;