Commit 190b1036 authored by Linus Torvalds's avatar Linus Torvalds

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
parents e75080f1 09e15086
...@@ -355,6 +355,7 @@ acpi_evaluate_reference(acpi_handle handle, ...@@ -355,6 +355,7 @@ acpi_evaluate_reference(acpi_handle handle,
} }
if (package->package.count > ACPI_MAX_HANDLES) { if (package->package.count > ACPI_MAX_HANDLES) {
kfree(package);
return AE_NO_MEMORY; return AE_NO_MEMORY;
} }
list->count = package->package.count; list->count = package->package.count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment