Browse Source

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
Linus Torvalds 7 years ago
parent
commit
190b10367b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/acpi/utils.c

+ 1 - 0
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;